合并测试环境代码准备备用页面

This commit is contained in:
sunli_tydic
2025-12-09 17:45:24 +08:00
parent b05c8b83db
commit 3dfe1ea87c

View File

@@ -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"
@@ -8,7 +14,7 @@
></portal-header>
<div style="margin: 0px 80px">
<div class="banner-crumbs">
<router-link to="/course"
<router-link :to="newEmployee ? `/new-employee/study` : `/course`"
><span class="crumbs-first">课程列表</span></router-link
>
<span class="crumbs-line"> &gt; </span>
@@ -20,8 +26,7 @@
<!--
<span class="bcourse-score" v-if="courseInfo.score>0">{{toScore(courseInfo.score)}} </span>
<span class="bcourse-score" v-else>无评分</span>
-->
</div>
--></div>
</div>
</div>
<div class="course-content xcontent">
@@ -64,7 +69,9 @@
<img
class="icon-small"
v-if="isPraise"
:src="require('@/assets/images/icon/praise-active.png')"
:src="
require('@/assets/images/icon/praise-active.png')
"
/>
<img
class="icon-small"
@@ -248,17 +255,41 @@
<div class="score" style="display: flex">
<div
v-if="!scoreInfo.has"
style="margin-left: 10px; cursor: pointer; padding-top: 18px"
style="
margin-left: 10px;
cursor: pointer;
padding-top: 10px;
display: flex;
align-items: center;
"
>
<!-- <el-popover placement="top" width="300" trigger="hover"> -->
<!-- <div style="text-align:center;line-height:50px;padding:20px 0px">
<div style="padding-top:30px"><el-button @click="addScore">提交评分</el-button></div>
</div> -->
<p style="margin-right: 10px">告诉我们您的喜欢程度</p>
<el-rate
v-model="scoreInfo.score"
@change="addScore"
@change="showConfirmScore"
:allow-half="true"
></el-rate>
<div v-if="isShowScoreConfirm">
<span class="score-text">{{
toScore(scoreInfo.score)
}}</span>
<span style="font-size: 18px"></span>
<el-button
style="margin-left: 10px"
type="primary"
size="mini"
@click="addScore"
>确定</el-button
>
<el-button size="mini" @click="handleCancelScore"
>取消</el-button
>
</div>
<!-- <el-tag class="ref-score" slot="reference">去评分</el-tag> -->
<!-- </el-popover> -->
</div>
@@ -323,7 +354,9 @@
<img
class="icon-small"
v-if="isTrample"
:src="require('@/assets/images/icon/trample-active.png')"
:src="
require('@/assets/images/icon/trample-active.png')
"
/>
<img
class="icon-small"
@@ -373,34 +406,12 @@
></i
>我的笔记
</div>
<!-- 开发阶段先放开 v-if="courseInfo.aiDraft == 1" -->
<div
@click="heartabthree"
v-if="courseInfo.aiDraft == 1 && contentData.contentType == 10"
:class="tab == 3 ? 'control-tab-active' : ' '"
style="position: relative"
>
<i
class="el-icon-document"
style="margin-right: 9px; margin-left: 9px"
></i
>ai文稿
<img
src="@/assets/images/course/wengaoTip.png"
alt=""
style="
position: absolute;
top: -3px;
right: -14px;
width: 15px;
height: 14px;
"
/>
</div>
</div>
<!-- 课程单元 -->
<div class="course-units" v-if="tab == 1">
<div style="min-height: 350px; max-height: 650px; overflow-y: auto">
<div
style="min-height: 350px; max-height: 650px; overflow-y: auto"
>
<div class="catalog" v-if="courseInfo.type == 20">
<div
v-for="(item, index) in catalogTree"
@@ -416,10 +427,16 @@
@open="handleOpen"
@close="handleClose"
>
<el-submenu :index="item.section.id">
<el-submenu
:index="item.section.id"
v-if="catalogTree.length > 1"
>
<template slot="title">
<div
style="display: flex; justify-content: space-between"
style="
display: flex;
justify-content: space-between;
"
>
<div
style="
@@ -454,7 +471,9 @@
>
<div
class="units-info"
:class="{ 'units-active': contentData.id == ele.id }"
:class="{
'units-active': contentData.id == ele.id,
}"
@click="showRes(ele, i, index, item)"
>
<el-menu-item
@@ -492,7 +511,8 @@
<!-- <img v-if="contentData.id == ele.id" :src="`${webBaseUrl}/images/playicon.png`" alt=""> -->
<img
v-if="
contentData.id == ele.id && ele.status == 9
contentData.id == ele.id &&
ele.status == 9
"
style="width: 16px; height: 16px"
src="@/assets/images/over.png"
@@ -500,7 +520,8 @@
/>
<img
v-if="
contentData.id == ele.id && ele.status == 0
contentData.id == ele.id &&
ele.status == 0
"
style="width: 16px; height: 16px"
src="@/assets/images/nowNot.png"
@@ -518,7 +539,8 @@
/>
<img
v-if="
contentData.id != ele.id && ele.status == 9
contentData.id != ele.id &&
ele.status == 9
"
style="width: 16px; height: 16px"
src="@/assets/images/notNew.png"
@@ -526,7 +548,8 @@
/>
<img
v-if="
contentData.id != ele.id && ele.status == 0
contentData.id != ele.id &&
ele.status == 0
"
style="width: 16px; height: 16px"
src="@/assets/images/not.png"
@@ -548,6 +571,113 @@
</div>
</el-menu-item-group>
</el-submenu>
<div v-else>
<el-menu-item-group
v-for="(ele, i) in item.children"
:key="i"
>
<div
class="units-info"
:class="{
'units-active': contentData.id == ele.id,
}"
@click="showRes(ele, i, index, item)"
>
<el-menu-item
:index="ele.id"
style="padding: 0; padding-left: 10px"
>
<div
style="
display: flex;
justify-content: space-between;
"
>
<div
style="
width: 200px;
font-size: 16px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
"
:title="ele.contentName"
>
{{ i + 1 }}. {{ ele.contentName }}
</div>
<div>
<span
v-if="contentData.id == ele.id"
style="
color: #387df7;
font-size: 14px;
margin-right: 4px;
"
>学习中</span
>
<!-- <img v-if="contentData.id == ele.id" :src="`${webBaseUrl}/images/playicon.png`" alt=""> -->
<img
v-if="
contentData.id == ele.id &&
ele.status == 9
"
style="width: 16px; height: 16px"
src="@/assets/images/over.png"
alt=""
/>
<img
v-if="
contentData.id == ele.id &&
ele.status == 0
"
style="width: 16px; height: 16px"
src="@/assets/images/nowNot.png"
alt=""
/>
<img
v-if="
contentData.id == ele.id &&
ele.status != 9 &&
ele.status != 0
"
style="width: 16px; height: 16px"
src="@/assets/images/ban1.png"
alt=""
/>
<img
v-if="
contentData.id != ele.id &&
ele.status == 9
"
style="width: 16px; height: 16px"
src="@/assets/images/notNew.png"
alt=""
/>
<img
v-if="
contentData.id != ele.id &&
ele.status == 0
"
style="width: 16px; height: 16px"
src="@/assets/images/not.png"
alt=""
/>
<img
v-if="
contentData.id != ele.id &&
ele.status != 9 &&
ele.status != 0
"
style="width: 16px; height: 16px"
src="@/assets/images/newBan.png"
alt=""
/>
</div>
</div>
</el-menu-item>
</div>
</el-menu-item-group>
</div>
</el-menu>
</div>
<!-- <div v-for="(item, index) in catalogTree" :key="index" :name="index">
@@ -584,7 +714,11 @@
<div style="margin-left: 5px">
<span
v-if="contentData.id == list.id"
style="color: #387df7; font-size: 14px; margin-right: 4px"
style="
color: #387df7;
font-size: 14px;
margin-right: 4px;
"
>学习中</span
>
<img
@@ -701,7 +835,9 @@
srcset=""
/>
目标人群:
<div class="course-info-text">{{ courseInfo.forUsers }}</div>
<div class="course-info-text">
{{ courseInfo.forUsers }}
</div>
</div>
<div class="course-info-row">
<img
@@ -779,20 +915,29 @@
@click="toUserHome(item)"
title="点击进入他的主页"
>
<!-- <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
:src="fileBaseUrl + item.authorInfo.avatar"
shape="circle"
:size="50"
></el-avatar>
</div>
<div v-else-if="item.photo">
<el-avatar
:src="item.photo"
shape="circle"
:size="50"
></el-avatar>
</div>
<div v-else class="teacher-text">
<div v-if="item.authorInfo.sex === 1">
<img src="../../../public/images/Avatarman.png" alt="" />
<div v-if="item.authorInfo && item.authorInfo.sex === 1">
<img
src="../../../public/images/Avatarwoman.png"
alt=""
/>
</div>
<div v-else>
<img src="../../../public/images/Avatarwoman.png" alt="" />
<img src="../../../public/images/Avatarman.png" alt="" />
</div>
</div>
</div>
@@ -837,6 +982,7 @@
</el-dialog>
<!-- <div><portal-footer></portal-footer></div> -->
</div>
</div>
</template>
<script>
import { mapGetters, mapMutations } from "vuex";
@@ -903,6 +1049,7 @@ export default {
},
data() {
return {
isShowScoreConfirm: false,
protocolDialogVisible: false,
tentative: false,
isContentTypeTwo: null,
@@ -1057,6 +1204,13 @@ export default {
SET_selectableLang: 'video/SET_selectableLang',
SET_courseInfo: 'video/SET_courseInfo',
}),
handleCancelScore() {
this.isShowScoreConfirm = false;
this.scoreInfo.score = 5;
},
showConfirmScore() {
this.isShowScoreConfirm = true;
},
handleOpen(key, path) {
if (this.isFalse) {
this.defaultOpeneds = [key];
@@ -1175,8 +1329,6 @@ export default {
let ctime = parseInt(nowDate.getTime() / 1000);
let beforeUrl = parseInt(nowDate.getTime() / 1000) + "/" + fid;
let urlSign = encodeURIComponent(encrypt(beforeUrl));
console.log(fid, 'fid');
console.log(u, 'u');
cookies.set("PLAYSIGN_TIME", ctime); //写客户端的cookie保存
//以下判断是为了区分本地环境和服务器环境
if (process.env.NODE_ENV == "development") {
@@ -1214,7 +1366,7 @@ export default {
if (r.contentType == 10 || r.contentType == 20) {
this.trueFalse = true;
if (r.content.startsWith("\{")) {
if (r.content.startsWith("{")) {
this.curriculumData = JSON.parse(r.content);
} else {
this.curriculumData.url = r.content;
@@ -1271,7 +1423,7 @@ export default {
});
} else if (r.contentType == 52) {
this.isAppendTime = false;
if (r.content.startsWith("\{")) {
if (r.content.startsWith("{")) {
this.conLink = JSON.parse(r.content);
} else {
this.conLink.url = r.content;
@@ -1386,6 +1538,12 @@ export default {
localStorage.setItem("videoProgressData", JSON.stringify(arr));
}
},
isShowTime() {
if (this.isContentTypeTwo != this.contentData.contentType) {
return;
}
this.contentData.status = 2;
},
// ai播放器相关 - 视频处理
handleAIVideo(list = [], r) {
console.log('触发了-----------list', list);
@@ -1396,12 +1554,6 @@ export default {
}
console.log("ai处理", this.selectableLang);
},
isShowTime() {
if (this.isContentTypeTwo != this.contentData.contentType) {
return;
}
this.contentData.status = 2;
},
showRes(r, i, index, item) {
//i:子节下标index:章下标
// 无权限查看不能点击
@@ -1451,7 +1603,6 @@ export default {
}
}
}
console.log(r, 'r');
this.changePlayRes(r, item);
},
loadScorePraiseAndTrample() {
@@ -2042,11 +2193,19 @@ export default {
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) {