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="点击进入他的主页"
>
<!-- <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 class="teacher-text">
<!-- <div v-else class="teacher-text">
<div v-if="item.authorInfo.sex === 1">
<img src="../../../public/images/Avatarman.png" alt="" />
</div>
<div v-else>
<img src="../../../public/images/Avatarwoman.png" alt="" />
</div>
</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 && 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 class="teacher-info">
<div class="teacher-name">
@@ -839,30 +847,30 @@
</div>
</template>
<script>
// ai播放器相关
import { mapGetters, mapMutations } from "vuex";
import followButton from "@/components/Follow/button.vue";
import portalHeader from "@/components/PortalHeader.vue";
import portalFooter from "@/components/PortalFooter.vue";
import comments from "@/components/Portal/comments.vue";
import noteComments from "@/components/Portal/noteComment.vue";
import interactBar from "@/components/Portal/interactBar.vue";
import audioPlayer from "@/components/AudioPlayer/index.vue";
import videoPlayer from "@/components/VideoPlayer/index.vue";
import hyperLink from "@/components/Course/hyperLink.vue";
import studyUtil from "@/utils/study.js";
import { encrypt } from "@/utils/jsencrypt.js";
import cookies from "vue-cookies";
import apiStat from "@/api/phase2/stat.js";
import apiStudy from "@/api/modules/courseStudy.js";
import apiVideoStudy from "@/api/modules/videoStudy.js";
import apiCourseGrade from "@/api/modules/courseGrade.js";
import apiPraises from "@/api/modules/praises.js";
import apiTrample from "@/api/modules/trample.js";
import apiCoursePortal from "@/api/modules/coursePortal.js";
import apiUser from "@/api/system/user.js";
import apiCourseFile from "@/api/modules/courseFile.js";
import {
// ai播放器相关
import { mapGetters, mapMutations } from "vuex";
import followButton from "@/components/Follow/button.vue";
import portalHeader from "@/components/PortalHeader.vue";
import portalFooter from "@/components/PortalFooter.vue";
import comments from "@/components/Portal/comments.vue";
import noteComments from "@/components/Portal/noteComment.vue";
import interactBar from "@/components/Portal/interactBar.vue";
import audioPlayer from "@/components/AudioPlayer/index.vue";
import videoPlayer from "@/components/VideoPlayer/index.vue";
import hyperLink from "@/components/Course/hyperLink.vue";
import studyUtil from "@/utils/study.js";
import { encrypt } from "@/utils/jsencrypt.js";
import cookies from "vue-cookies";
import apiStat from "@/api/phase2/stat.js";
import apiStudy from "@/api/modules/courseStudy.js";
import apiVideoStudy from "@/api/modules/videoStudy.js";
import apiCourseGrade from "@/api/modules/courseGrade.js";
import apiPraises from "@/api/modules/praises.js";
import apiTrample from "@/api/modules/trample.js";
import apiCoursePortal from "@/api/modules/coursePortal.js";
import apiUser from "@/api/system/user.js";
import apiCourseFile from "@/api/modules/courseFile.js";
import {
resListMap,
resOwnerListMap,
courseType,
@@ -870,20 +878,20 @@ import {
toScore,
cutOrgNamePath,
userAvatarText,
} from "@/utils/tools.js";
import pdfPreview from "@/components/PdfPreview/index.vue";
import courseImage from "@/components/Course/courseImage.vue";
import exam from "@/components/Course/exam";
import homework from "@/components/Course/homework";
import assess from "@/components/Course/assess";
import myNote from "../../components/Course/myNote.vue";
// ai播放器相关
import aiScript from "../../components/Course/aiScript.vue";
import apiFollow from "@/api/phase2/userfollow.js";
import apiMessage from "@/api/system/message.js";
// import Vue from 'vue';
// Vue.forceUpdate();
export default {
} from "@/utils/tools.js";
import pdfPreview from "@/components/PdfPreview/index.vue";
import courseImage from "@/components/Course/courseImage.vue";
import exam from "@/components/Course/exam";
import homework from "@/components/Course/homework";
import assess from "@/components/Course/assess";
import myNote from "../../components/Course/myNote.vue";
// ai播放器相关
import aiScript from "../../components/Course/aiScript.vue";
import apiFollow from "@/api/phase2/userfollow.js";
import apiMessage from "@/api/system/message.js";
// import Vue from 'vue';
// Vue.forceUpdate();
export default {
name: "atticle",
components: {
courseImage,
@@ -1177,8 +1185,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") {
@@ -1216,7 +1222,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;
@@ -1273,7 +1279,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;
@@ -1453,7 +1459,6 @@ export default {
}
}
}
console.log(r, 'r');
this.changePlayRes(r, item);
},
loadScorePraiseAndTrample() {
@@ -2044,11 +2049,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) {
@@ -2384,37 +2397,37 @@ export default {
this.cleanAppendTime();
this.stopStudyTime();
},
};
};
</script>
<style lang="scss" scoped>
::v-deep .el-icon-arrow-down {
::v-deep .el-icon-arrow-down {
color: #000;
font-weight: 900;
font-size: 16px;
}
.el-menu,
.el-menu-item,
.el-submenu__title {
}
.el-menu,
.el-menu-item,
.el-submenu__title {
background-color: transparent !important; /* 设置背景色为透明,以移除默认的背景颜色变化 */
color: inherit !important; /* 确保文字颜色不变,如果需要的话 */
}
}
/* 取消选中效果 */
.el-menu-item.is-active,
.el-submenu__title.is-active {
/* 取消选中效果 */
.el-menu-item.is-active,
.el-submenu__title.is-active {
background-color: transparent !important; /* 移除选中时的背景色 */
color: inherit !important; /* 保持文字颜色与未选中时一致,如果需要的话 */
}
}
/* 如果有特定的 hover 样式,也可以取消 */
.el-menu-item:hover,
.el-submenu__title:hover {
/* 如果有特定的 hover 样式,也可以取消 */
.el-menu-item:hover,
.el-submenu__title:hover {
background-color: transparent !important; /* 移除鼠标悬停时的背景色变化 */
color: inherit !important; /* 保持文字颜色不变 */
}
//内容块样式定义
.course-content {
}
//内容块样式定义
.course-content {
min-height: 745px;
margin: 20px auto;
@@ -2478,9 +2491,9 @@ export default {
width: 420px;
}
}
}
}
.control-tab {
.control-tab {
margin: 35px 30px 10px 30px;
border-bottom: 1px solid #d8d8d8;
@@ -2495,9 +2508,9 @@ export default {
color: #333333;
font-weight: 600;
}
}
}
.course-info-tab {
.course-info-tab {
display: flex;
padding-top: 30px;
margin-left: 47px;
@@ -2523,9 +2536,9 @@ export default {
top: 128%;
}
}
}
}
.course-info-row {
.course-info-row {
padding: 10px 0;
font-size: 18px;
color: #343434;
@@ -2539,9 +2552,9 @@ export default {
color: #666666;
word-break: break-all;
}
}
//右侧老师部分头部及标题
.cteacher-top {
}
//右侧老师部分头部及标题
.cteacher-top {
background-color: #fff;
margin-top: 0px;
.cteacher-top-bar {
@@ -2555,15 +2568,15 @@ export default {
font-weight: 600;
line-height: 50px;
}
}
//右侧老师部分 老师列表
.cteacher-list {
}
//右侧老师部分 老师列表
.cteacher-list {
background-color: #fff;
padding: 10px 30px 30px 30px;
}
}
//以下是未整理的样式,上面的整理之后的样式
.coures-note {
//以下是未整理的样式,上面的整理之后的样式
.coures-note {
min-height: 500px;
padding-left: 17px;
padding-top: 10px;
@@ -2576,9 +2589,9 @@ export default {
.note-info {
}
}
}
.player-box {
.player-box {
position: absolute;
width: 100%;
max-width: 300px;
@@ -2603,64 +2616,64 @@ export default {
.player-rate {
margin-top: 35px;
}
}
}
.score-text {
.score-text {
font-size: 18px;
color: #ffb30f;
font-family: "Arial";
margin-left: 23px;
// font-weight: 600;
}
}
// .score {
// display: flex;
// justify-content: center;
// align-items: center;
// .score {
// display: flex;
// justify-content: center;
// align-items: center;
// .el-rate {
// display: inline-block;
// }
// // margin-bottom: 19px;
// .score-no {
// color: #ffb30f;
// padding: 5px 0;
// background: #efefef;
// border-radius: 20px;
// width: 65px;
// font-size: 12px;
// font-weight: 600;
// text-align: center;
// }
// }
// .el-rate {
// display: inline-block;
// }
// // margin-bottom: 19px;
// .score-no {
// color: #ffb30f;
// padding: 5px 0;
// background: #efefef;
// border-radius: 20px;
// width: 65px;
// font-size: 12px;
// font-weight: 600;
// text-align: center;
// }
// }
.portal-content-title {
.portal-content-title {
font-weight: 600;
padding: 10px;
font-size: 22px;
line-height: 40px;
color: #333333;
word-break: break-all;
}
}
.type-kuang {
.type-kuang {
color: #666666;
border: 1px solid #666666;
}
}
.type-click {
.type-click {
color: #ffb30f !important;
border: 1px solid #ffb30f !important;
}
}
::v-deep .el-rate__icon {
::v-deep .el-rate__icon {
font-size: 22px;
margin-right: 6px;
color: #ff8e00;
transition: 0.3s;
}
}
.ref-score {
.ref-score {
// background: #e4e4e4;
// width: 64px;
// height: 32px;
@@ -2670,16 +2683,16 @@ export default {
// color: #000;
// font-size: 14px;
// border: none;
}
}
.icon-small {
.icon-small {
width: 16px;
height: 16px;
line-height: 16px;
vertical-align: middle;
}
}
.con-audio {
.con-audio {
padding: 50px;
text-align: center;
@@ -2692,9 +2705,9 @@ export default {
min-height: 300px;
padding: 60px 50px 80px 50px;
}
}
}
.hyper-link {
.hyper-link {
padding-left: 20px;
text-align: center;
padding-top: 100px;
@@ -2702,9 +2715,9 @@ export default {
.hyper-link-row {
padding: 20px;
}
}
}
.catalog-box {
.catalog-box {
background: #fff;
// padding: 15px 0px;
@@ -2715,19 +2728,19 @@ export default {
color: #333333;
padding-left: 20px;
}
}
}
.collapse-title {
.collapse-title {
flex: 1 0 90%;
order: 1;
}
}
.el-collapse-item__header {
.el-collapse-item__header {
flex: 1 0 auto;
order: -1;
}
}
.course-interact {
.course-interact {
flex: 1; // 20%高度
height: 54px;
// padding-top: 10px;
@@ -2738,18 +2751,18 @@ export default {
display: flex;
justify-content: space-between;
box-sizing: border-box;
}
}
.interact-btn {
.interact-btn {
margin-right: 10px;
}
}
.uc-badge {
.uc-badge {
margin-top: 10px;
margin-right: 40px;
}
}
.cres-list {
.cres-list {
list-style-type: decimal;
margin: 0px;
@@ -2760,9 +2773,9 @@ export default {
.current {
color: #1ea0fa;
}
}
}
.uc-course {
.uc-course {
display: flex;
justify-content: space-around;
border: 1px solid #f0f0f0;
@@ -2795,9 +2808,9 @@ export default {
.uc-course-btns {
width: 150px;
}
}
}
.catalog-cell-state2 {
.catalog-cell-state2 {
height: 24px;
width: 58px;
line-height: 20px;
@@ -2808,9 +2821,9 @@ export default {
border-radius: 6px;
margin-left: 2px;
background: #ffedd6;
}
}
.catalog-cell-state9 {
.catalog-cell-state9 {
height: 24px;
width: 58px;
line-height: 20px;
@@ -2823,9 +2836,9 @@ export default {
background: #edf2fd;
// margin-left: 68%;
// background-color: #BED2F8;
}
}
.catalog-cell-state1 {
.catalog-cell-state1 {
height: 24px;
width: 58px;
line-height: 20px;
@@ -2836,9 +2849,9 @@ export default {
font-size: 12px;
margin-left: 2px;
background: #fff0f0;
}
}
.catalog {
.catalog {
height: 100%;
max-width: 500px;
overflow: auto;
@@ -2874,9 +2887,9 @@ export default {
color: #5c5c5c;
}
}
}
}
.video-div {
.video-div {
position: absolute;
z-index: 999999999;
top: 0;
@@ -2908,9 +2921,9 @@ export default {
}
}
}
}
}
::v-deep .el-tag {
::v-deep .el-tag {
background-color: #ecf5ff;
border-color: #409eff;
display: inline-block;
@@ -2924,14 +2937,14 @@ export default {
border-radius: 0px;
box-sizing: border-box;
white-space: nowrap;
}
}
::v-deep .teacher .teacher-avator .teacher-text {
::v-deep .teacher .teacher-avator .teacher-text {
background: none;
border: none;
}
}
.teacher {
.teacher {
background-color: #ffffff;
display: flex;
width: 100%;
@@ -2975,14 +2988,14 @@ export default {
word-break: break-all;
}
}
}
}
.breadname {
.breadname {
margin-bottom: 15px;
}
}
//目录的样式更改
::v-deep .el-collapse-item {
//目录的样式更改
::v-deep .el-collapse-item {
.el-collapse-item__header {
// position: relative;
direction: rtl;
@@ -3000,9 +3013,9 @@ export default {
display: none;
}
}
}
}
.course-units {
.course-units {
padding: 10px 30px;
.units-info {
padding: 0 30px;
@@ -3028,13 +3041,13 @@ export default {
// margin-right: 20px;
}
}
}
}
.more {
.more {
float: right;
}
}
.coures-title {
.coures-title {
margin-left: 82px;
font-size: 20px;
font-weight: 600;
@@ -3064,32 +3077,32 @@ export default {
color: #ffffff;
margin: 0 20px;
}
}
}
::v-deep.el-breadcrumb__item:first-child .el-breadcrumb__inner a,
.el-breadcrumb__inner .is-link {
::v-deep.el-breadcrumb__item:first-child .el-breadcrumb__inner a,
.el-breadcrumb__inner .is-link {
color: #fff !important;
}
}
::v-deep.el-breadcrumb__item:last-child .el-breadcrumb__inner {
::v-deep.el-breadcrumb__item:last-child .el-breadcrumb__inner {
color: #fff !important;
}
}
::v-deep.hear-nav {
::v-deep.hear-nav {
color: #fff !important;
}
}
.breadcrumb-nav {
.breadcrumb-nav {
color: #ffffff;
}
}
.coures-bg {
.coures-bg {
width: 100%;
height: 200px;
background: url("../../../public/images/couresdetail.png");
}
}
.protocol {
.protocol {
.protocol-title {
font-size: 20px;
font-weight: 600;
@@ -3101,5 +3114,5 @@ export default {
font-size: 14px;
line-height: 25px;
}
}
}
</style>