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,23 +2243,26 @@
}, this.appentInterval * 1000); }, this.appentInterval * 1000);
}, },
finishStudyItem() { //设置完成学习的内容,针对于音视频的内容 finishStudyItem() {
if (!this.contentData.studyItemId) { //设置完成学习的内容,针对于音视频的内容
//这种可能没有不过这里也是为了万中那个1 if (!this.contentData.studyItemId) {
!this.tentative && this.saveStudyInfo(); //这种可能没有不过这里也是为了万中那个1
} else { !this.tentative && this.saveStudyInfo();
// 如果正在处理完成请求,则直接返回,避免重复调用 } else {
if (this.isFinishingStudyItem) { // 如果正在处理完成请求,则直接返回,避免重复调用
return; if (this.isFinishingStudyItem) {
} return;
let params = { }
itemId: this.contentData.studyItemId, let params = {
studyId: this.studyId, itemId: this.contentData.studyItemId,
courseId: this.courseId, studyId: this.studyId,
cnum: this.totalContent courseId: this.courseId,
} cnum: this.totalContent,
this.isFinishingStudyItem = true; // 设置标志位 };
apiVideoStudy.finishStudyItem(params).then(res => { this.isFinishingStudyItem = true; // 设置标志位
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,12 +2270,13 @@
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; // 出错时也重置标志位
}); });
} }
}, },
saveStudyItem() { saveStudyItem() {
//先保存学习的内容,针对于音视频的内容 //先保存学习的内容,针对于音视频的内容
@@ -2519,20 +2537,20 @@
} }
} }
.player-box { .player-box {
position: absolute; position: absolute;
width: 100%; width: 100%;
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;
top: 50%; top: 50%;
box-sizing: border-box; box-sizing: border-box;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
.player-praise { .player-praise {
margin-top: 25px; margin-top: 25px;