ai视频一期功能提交

This commit is contained in:
sunli_tydic
2025-12-10 13:21:57 +08:00
parent 82c765edd4
commit 27e76da571

View File

@@ -780,21 +780,29 @@
title="点击进入他的主页" title="点击进入他的主页"
> >
<!-- <div class="teacher-text" v-if="item.authorInfo.avatar == ''">{{userAvatarText(item.teacherName)}}</div> --> <!-- <div class="teacher-text" v-if="item.authorInfo.avatar == ''">{{userAvatarText(item.teacherName)}}</div> -->
<div v-if="item.authorInfo.avatar !== ''"> <div v-if="item.authorInfo && item.authorInfo.avatar">
<el-avatar <el-avatar
:src="fileBaseUrl + item.authorInfo.avatar" :src="fileBaseUrl + item.authorInfo.avatar"
shape="circle" shape="circle"
:size="50" :size="50"
></el-avatar> ></el-avatar>
</div> </div>
<div v-else class="teacher-text"> <!-- <div v-else class="teacher-text">
<div v-if="item.authorInfo.sex === 1"> <div v-if="item.authorInfo.sex === 1">
<img src="../../../public/images/Avatarman.png" alt="" /> <img src="../../../public/images/Avatarman.png" alt="" />
</div> </div>
<div v-else> <div v-else>
<img src="../../../public/images/Avatarwoman.png" alt="" /> <img src="../../../public/images/Avatarwoman.png" alt="" />
</div> </div>
</div>-->
<div v-else-if="item.photo">
<el-avatar :src="item.photo" shape="circle" :size="50"></el-avatar>
</div> </div>
<div v-else class="teacher-text">
<div v-if="item.authorInfo && item.authorInfo.sex === 1"><img src="../../../public/images/Avatarwoman.png" alt=""></div>
<div v-else><img src="../../../public/images/Avatarman.png" alt=""></div>
</div>
</div> </div>
<div class="teacher-info"> <div class="teacher-info">
<div class="teacher-name"> <div class="teacher-name">
@@ -1177,8 +1185,6 @@ export default {
let ctime = parseInt(nowDate.getTime() / 1000); let ctime = parseInt(nowDate.getTime() / 1000);
let beforeUrl = parseInt(nowDate.getTime() / 1000) + "/" + fid; let beforeUrl = parseInt(nowDate.getTime() / 1000) + "/" + fid;
let urlSign = encodeURIComponent(encrypt(beforeUrl)); let urlSign = encodeURIComponent(encrypt(beforeUrl));
console.log(fid, 'fid');
console.log(u, 'u');
cookies.set("PLAYSIGN_TIME", ctime); //写客户端的cookie保存 cookies.set("PLAYSIGN_TIME", ctime); //写客户端的cookie保存
//以下判断是为了区分本地环境和服务器环境 //以下判断是为了区分本地环境和服务器环境
if (process.env.NODE_ENV == "development") { if (process.env.NODE_ENV == "development") {
@@ -1216,7 +1222,7 @@ export default {
if (r.contentType == 10 || r.contentType == 20) { if (r.contentType == 10 || r.contentType == 20) {
this.trueFalse = true; this.trueFalse = true;
if (r.content.startsWith("\{")) { if (r.content.startsWith("{")) {
this.curriculumData = JSON.parse(r.content); this.curriculumData = JSON.parse(r.content);
} else { } else {
this.curriculumData.url = r.content; this.curriculumData.url = r.content;
@@ -1273,7 +1279,7 @@ export default {
}); });
} else if (r.contentType == 52) { } else if (r.contentType == 52) {
this.isAppendTime = false; this.isAppendTime = false;
if (r.content.startsWith("\{")) { if (r.content.startsWith("{")) {
this.conLink = JSON.parse(r.content); this.conLink = JSON.parse(r.content);
} else { } else {
this.conLink.url = r.content; this.conLink.url = r.content;
@@ -1453,7 +1459,6 @@ export default {
} }
} }
} }
console.log(r, 'r');
this.changePlayRes(r, item); this.changePlayRes(r, item);
}, },
loadScorePraiseAndTrample() { loadScorePraiseAndTrample() {
@@ -2044,11 +2049,19 @@ export default {
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) {