mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36:43 +08:00
Merge branch '20251124-fix-1302' of http://10.251.129.121/boeu/learning-system-portal into test1024
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="xpage-coures-banner">
|
||||
<portal-header
|
||||
current="course"
|
||||
textColor="#fff"
|
||||
:goSearch="1"
|
||||
></portal-header>
|
||||
<div style="margin: 0px 80px">
|
||||
<portal-header
|
||||
current="course"
|
||||
textColor="#fff"
|
||||
@@ -1993,11 +1999,19 @@
|
||||
timedOut = true;
|
||||
xmlhttp.abort();
|
||||
}, 1000);
|
||||
xmlhttp.open(
|
||||
"HEAD",
|
||||
window.location.protocol + "//uapi.boe.com.cn/500.html",
|
||||
true
|
||||
);
|
||||
// 1. 拼接随机参数(时间戳+随机数,确保URL唯一,破缓存)
|
||||
const url =
|
||||
window.location.protocol +
|
||||
"//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.onreadystatechange = function () {
|
||||
if (xmlhttp.readyState == 4) {
|
||||
@@ -2229,23 +2243,26 @@
|
||||
}, this.appentInterval * 1000);
|
||||
},
|
||||
|
||||
finishStudyItem() { //设置完成学习的内容,针对于音视频的内容
|
||||
if (!this.contentData.studyItemId) {
|
||||
//这种可能没有,不过这里也是为了万中那个1
|
||||
!this.tentative && this.saveStudyInfo();
|
||||
} else {
|
||||
// 如果正在处理完成请求,则直接返回,避免重复调用
|
||||
if (this.isFinishingStudyItem) {
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
itemId: this.contentData.studyItemId,
|
||||
studyId: this.studyId,
|
||||
courseId: this.courseId,
|
||||
cnum: this.totalContent
|
||||
}
|
||||
this.isFinishingStudyItem = true; // 设置标志位
|
||||
apiVideoStudy.finishStudyItem(params).then(res => {
|
||||
finishStudyItem() {
|
||||
//设置完成学习的内容,针对于音视频的内容
|
||||
if (!this.contentData.studyItemId) {
|
||||
//这种可能没有,不过这里也是为了万中那个1
|
||||
!this.tentative && this.saveStudyInfo();
|
||||
} else {
|
||||
// 如果正在处理完成请求,则直接返回,避免重复调用
|
||||
if (this.isFinishingStudyItem) {
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
itemId: this.contentData.studyItemId,
|
||||
studyId: this.studyId,
|
||||
courseId: this.courseId,
|
||||
cnum: this.totalContent,
|
||||
};
|
||||
this.isFinishingStudyItem = true; // 设置标志位
|
||||
apiVideoStudy
|
||||
.finishStudyItem(params)
|
||||
.then((res) => {
|
||||
if (res.status == 200) {
|
||||
this.contentData.status = 9;
|
||||
this.contentData.progress = 100;
|
||||
@@ -2253,12 +2270,13 @@
|
||||
console.log("记录完成学习失败:" + res.message + "," + res.error);
|
||||
}
|
||||
this.isFinishingStudyItem = false; // 重置标志位
|
||||
}).catch(error => {
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("记录完成学习出错:", error);
|
||||
this.isFinishingStudyItem = false; // 出错时也重置标志位
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
saveStudyItem() {
|
||||
//先保存学习的内容,针对于音视频的内容
|
||||
@@ -2519,20 +2537,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
.player-box {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
max-width: 300px;
|
||||
margin: 20px auto;
|
||||
height: 187px;
|
||||
background: rgba(74, 74, 74, .8);
|
||||
border-radius: 33px;
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
top: 50%;
|
||||
box-sizing: border-box;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
.player-box {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
max-width: 300px;
|
||||
margin: 20px auto;
|
||||
height: 187px;
|
||||
background: rgba(74, 74, 74, 0.8);
|
||||
border-radius: 33px;
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
top: 50%;
|
||||
box-sizing: border-box;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
.player-praise {
|
||||
margin-top: 25px;
|
||||
|
||||
Reference in New Issue
Block a user