Merge branch '20251124-fix-1302' of http://10.251.129.121/boeu/learning-system-portal into test1024

This commit is contained in:
joshen
2025-11-27 14:12:42 +08:00
2 changed files with 529 additions and 323 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,12 @@
<template> <template>
<div> <div>
<div class="xpage-coures-banner"> <div class="xpage-coures-banner">
<portal-header
current="course"
textColor="#fff"
:goSearch="1"
></portal-header>
<div style="margin: 0px 80px">
<portal-header <portal-header
current="course" current="course"
textColor="#fff" textColor="#fff"
@@ -1993,11 +1999,19 @@
timedOut = true; timedOut = true;
xmlhttp.abort(); xmlhttp.abort();
}, 1000); }, 1000);
xmlhttp.open( // 1. 拼接随机参数(时间戳+随机数确保URL唯一破缓存
"HEAD", const url =
window.location.protocol + "//uapi.boe.com.cn/500.html", window.location.protocol +
true "//uapi.boe.com.cn/500.html?t=" +
); Date.now() +
Math.random();
// // 2. 打开 HEAD 请求URL已带随机参数
xmlhttp.open("HEAD", url, true);
// xmlhttp.open(
// "HEAD",
// window.location.protocol + "//uapi.boe.com.cn/500.html",
// true
// );
xmlhttp.send(); xmlhttp.send();
xmlhttp.onreadystatechange = function () { xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) { if (xmlhttp.readyState == 4) {
@@ -2229,7 +2243,8 @@
}, this.appentInterval * 1000); }, this.appentInterval * 1000);
}, },
finishStudyItem() { //设置完成学习的内容,针对于音视频的内容 finishStudyItem() {
//设置完成学习的内容,针对于音视频的内容
if (!this.contentData.studyItemId) { if (!this.contentData.studyItemId) {
//这种可能没有不过这里也是为了万中那个1 //这种可能没有不过这里也是为了万中那个1
!this.tentative && this.saveStudyInfo(); !this.tentative && this.saveStudyInfo();
@@ -2242,10 +2257,12 @@
itemId: this.contentData.studyItemId, itemId: this.contentData.studyItemId,
studyId: this.studyId, studyId: this.studyId,
courseId: this.courseId, courseId: this.courseId,
cnum: this.totalContent cnum: this.totalContent,
} };
this.isFinishingStudyItem = true; // 设置标志位 this.isFinishingStudyItem = true; // 设置标志位
apiVideoStudy.finishStudyItem(params).then(res => { apiVideoStudy
.finishStudyItem(params)
.then((res) => {
if (res.status == 200) { if (res.status == 200) {
this.contentData.status = 9; this.contentData.status = 9;
this.contentData.progress = 100; this.contentData.progress = 100;
@@ -2253,7 +2270,8 @@
console.log("记录完成学习失败:" + res.message + "" + res.error); console.log("记录完成学习失败:" + res.message + "" + res.error);
} }
this.isFinishingStudyItem = false; // 重置标志位 this.isFinishingStudyItem = false; // 重置标志位
}).catch(error => { })
.catch((error) => {
console.error("记录完成学习出错:", error); console.error("记录完成学习出错:", error);
this.isFinishingStudyItem = false; // 出错时也重置标志位 this.isFinishingStudyItem = false; // 出错时也重置标志位
}); });
@@ -2525,7 +2543,7 @@
max-width: 300px; max-width: 300px;
margin: 20px auto; margin: 20px auto;
height: 187px; height: 187px;
background: rgba(74, 74, 74, .8); background: rgba(74, 74, 74, 0.8);
border-radius: 33px; border-radius: 33px;
text-align: center; text-align: center;
padding: 20px; padding: 20px;