|
@@ -20,6 +20,7 @@
|
|
|
<div class="title">
|
|
|
<span>{{ changeName(courseId) }}</span>
|
|
|
<el-button
|
|
|
+ v-if="courseTotal > 1"
|
|
|
size="mini"
|
|
|
type="primary"
|
|
|
plain
|
|
@@ -66,6 +67,7 @@
|
|
|
<div slot="label">
|
|
|
<span class="label">{{ tab.label }}</span>
|
|
|
</div>
|
|
|
+ <!-- 章节目录 -->
|
|
|
<template v-if="tab.name == '1'">
|
|
|
<div class="right-box__body">
|
|
|
<div
|
|
@@ -636,6 +638,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
+ <!-- 重修目录 -->
|
|
|
<template v-if="tab.name == '2'">
|
|
|
<div class="right-box__body">
|
|
|
<div
|
|
@@ -2034,7 +2037,7 @@
|
|
|
:prop="item.required ? item.fieldKey : ''"
|
|
|
>
|
|
|
<el-input
|
|
|
- :disabled="true"
|
|
|
+ :disabled="disName"
|
|
|
v-model="infoForm.name"
|
|
|
:placeholder="`请输入${item.fieldName}`"
|
|
|
/>
|
|
@@ -2048,7 +2051,7 @@
|
|
|
:prop="item.required ? item.fieldKey : ''"
|
|
|
>
|
|
|
<el-input
|
|
|
- :disabled="true"
|
|
|
+ :disabled="disCard"
|
|
|
v-model="infoForm.idcard"
|
|
|
:placeholder="`请输入${item.fieldName}`"
|
|
|
/>
|
|
@@ -2294,7 +2297,7 @@
|
|
|
<span
|
|
|
v-if="item.fieldKey === 'recent_photos'"
|
|
|
style="color: #999999"
|
|
|
- >竖向证件照 文件大小≤2M</span
|
|
|
+ >竖向白底证件照 文件大小≤2M</span
|
|
|
>
|
|
|
<span
|
|
|
v-if="
|
|
@@ -2704,7 +2707,7 @@ export default {
|
|
|
courseList: [],
|
|
|
businessData: {},
|
|
|
courseHandoutsData: "",
|
|
|
- menuList: [],
|
|
|
+ // menuList: [],
|
|
|
goodsData: {},
|
|
|
tabList: [],
|
|
|
historyChatMsgList: [],
|
|
@@ -2906,7 +2909,7 @@ export default {
|
|
|
recent_photos: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请上传个人近照",
|
|
|
+ message: "请上传证件照",
|
|
|
trigger: ["change", "blur"],
|
|
|
},
|
|
|
],
|
|
@@ -2950,7 +2953,7 @@ export default {
|
|
|
],
|
|
|
},
|
|
|
|
|
|
- fileList1: [], //个人近照
|
|
|
+ fileList1: [], //证件照
|
|
|
fileList2: [], //人像
|
|
|
fileList3: [], //国徽
|
|
|
fileListStamp: [], //印章
|
|
@@ -2967,6 +2970,10 @@ export default {
|
|
|
clickLock: false,
|
|
|
liveLast: null,
|
|
|
apply_post_disabled: false,
|
|
|
+ disName: false, // 姓名是否禁止输入
|
|
|
+ disCard: false, // 身份证是否禁止输入
|
|
|
+ clickSectionItem: {}, // 点击节的内容
|
|
|
+ courseTotal: 0,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -3024,7 +3031,7 @@ export default {
|
|
|
this.orderGoodsId = this.$route.query.orderGoodsId;
|
|
|
this.gradeId = this.$route.query.gradeId;
|
|
|
this.sectionItem = this.$route.query;
|
|
|
-
|
|
|
+ console.log('this.sectionItem', this.sectionItem)
|
|
|
let isOther = this.$route.query.isOther || "";
|
|
|
|
|
|
if (isOther) {
|
|
@@ -3208,6 +3215,7 @@ export default {
|
|
|
this.playSectionId = res.data.sectionId;
|
|
|
this.vid = res.data.recordingUrl;
|
|
|
this.sectionItem = res.data;
|
|
|
+ console.log('================sectionItem', this.sectionItem)
|
|
|
this.playVideo(res.data);
|
|
|
} else if (res.data.sectionType == 2) {
|
|
|
//直播
|
|
@@ -3958,7 +3966,7 @@ export default {
|
|
|
}
|
|
|
} else {
|
|
|
this.uploading = false;
|
|
|
- this.$message.warning("个人近照和身份证人像面照片不匹配");
|
|
|
+ this.$message.warning("证件照和身份证人像面照片不匹配");
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -4417,6 +4425,7 @@ export default {
|
|
|
self.listData.forEach((item) => {
|
|
|
if (item.fieldKey == "idcard") {
|
|
|
this.infoForm.idcard = this.userInfo.idCard;
|
|
|
+ this.disCard = this.infoForm.idcard ? true : false
|
|
|
}
|
|
|
if (item.fieldKey == "telphone") {
|
|
|
this.infoForm.telphone = this.userInfo.telphone;
|
|
@@ -4424,6 +4433,7 @@ export default {
|
|
|
|
|
|
if (item.fieldKey == "name") {
|
|
|
this.infoForm.name = this.userInfo.realname || "";
|
|
|
+ this.disName = this.infoForm.name ? true : false
|
|
|
}
|
|
|
});
|
|
|
self.isRequired = self.listData.every((ims) => {
|
|
@@ -4794,6 +4804,7 @@ export default {
|
|
|
* 切换科目
|
|
|
*/
|
|
|
courseChange() {
|
|
|
+ console.log('切换科目')
|
|
|
return new Promise((resolve) => {
|
|
|
this.needOpen = true;
|
|
|
this.noteParams = {
|
|
@@ -4816,9 +4827,9 @@ export default {
|
|
|
this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
|
|
|
this.courseDetail(); //课程详情
|
|
|
this.getAnswerList(); //答疑列表
|
|
|
- this.answerTimer = setInterval(() => {
|
|
|
- this.getAnswerList();
|
|
|
- }, 5000);
|
|
|
+ // this.answerTimer = setInterval(() => {
|
|
|
+ // this.getAnswerList();
|
|
|
+ // }, 5000);
|
|
|
this.getMenuList(); //学习目录
|
|
|
this.getReMenuList(); //获取重修目录
|
|
|
this.getNoteList(); //获取节笔记
|
|
@@ -4981,6 +4992,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
getBuySectionList(chapterId, courseId, moduleId = 0, chapter) {
|
|
|
+ // /course/sectionList 查询章与节关系列表+章卷同级展示
|
|
|
this.$request
|
|
|
.reSectionList({
|
|
|
chapterId: chapterId,
|
|
@@ -5074,10 +5086,31 @@ export default {
|
|
|
resolve();
|
|
|
});
|
|
|
},
|
|
|
+ // 新增用户视频学习日志
|
|
|
+ studyLog(moduleId, chapterId, sectionId) {
|
|
|
+ this.$axios({
|
|
|
+ url: '/user/study/log',
|
|
|
+ method: 'post',
|
|
|
+ data: {
|
|
|
+ goodsId: this.goodsId,
|
|
|
+ courseId: this.courseId,
|
|
|
+ moduleId: moduleId || 0,
|
|
|
+ chapterId: chapterId || 0,
|
|
|
+ sectionId: sectionId || 0,
|
|
|
+ fromPlat: 2, //来源平台 1小程序 2PC网站
|
|
|
+ goodsType: 1, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
+ }
|
|
|
+ }).then((res) => {
|
|
|
+ console.log('直播的用户学习日志:', res)
|
|
|
+ })
|
|
|
+ },
|
|
|
/**
|
|
|
* 点击节
|
|
|
*/
|
|
|
async getResource(section) {
|
|
|
+ console.log('点击节节节', section)
|
|
|
+ this.clickSectionItem = section
|
|
|
//逻辑
|
|
|
if (section.sectionType === 2 && section.liveStartTime && section.liveEndTime) {
|
|
|
if (section.liveStartTime > this.nowTime) {
|
|
@@ -5145,6 +5178,7 @@ export default {
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
+ this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
@@ -5224,6 +5258,7 @@ export default {
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
+ this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
@@ -5268,6 +5303,7 @@ export default {
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
+ this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
|
|
|
}
|
|
|
return;
|
|
|
}
|
|
@@ -5285,6 +5321,7 @@ export default {
|
|
|
this.chapterId == (section.chapterId || 0)
|
|
|
) {
|
|
|
//切换为同一频道不作为
|
|
|
+ console.log('切换为同一频道不作为')
|
|
|
this.clickLock = false;
|
|
|
return;
|
|
|
}
|
|
@@ -5502,7 +5539,32 @@ export default {
|
|
|
},
|
|
|
|
|
|
async playVideo(option) {
|
|
|
- if (option.sectionType == 1 || option.sectionType == 3) {
|
|
|
+ console.log('asdhsuohfosufgasoug', option)
|
|
|
+ if (option.sectionType == 3) {
|
|
|
+ console.log('huifang')
|
|
|
+ // 回放
|
|
|
+ if (Object.keys(this.clickSectionItem).length) { //this.clickSectionItem 判断点击节才跳转, 不判断的话一进来页面到这里就直接跳转了
|
|
|
+ this.$router.push({
|
|
|
+ path: "/living-room/" + option.liveUrl,
|
|
|
+ query: {
|
|
|
+ goodsId: this.goodsId,
|
|
|
+ courseId: this.courseId,
|
|
|
+ gradeId: this.gradeId,
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
+ sectionId: option.sectionId || option.menuId,
|
|
|
+ chapterId: option.chapterId || 0,
|
|
|
+ moduleId: option.moduleId || 0,
|
|
|
+ sectionType: 3,
|
|
|
+ goodsName: option.name,
|
|
|
+ vid: option.recordingUrl, // 回放vid
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.clickSectionItem = {}
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (option.sectionType == 1) {
|
|
|
+ console.log('lubo点击点击点击点击')
|
|
|
//录播
|
|
|
|
|
|
//设置播放的节ID
|
|
@@ -5520,7 +5582,7 @@ export default {
|
|
|
//播放视频
|
|
|
this.showRecordStatus = false; //隐藏播放记录提示
|
|
|
this.sectionItem = option;
|
|
|
- console.log(option, "option");
|
|
|
+ console.log(option, "option=======>sectionItem");
|
|
|
this.isPlayRebuild = option.rebuild;
|
|
|
this.moduleId = option.moduleId || 0;
|
|
|
this.chapterId = option.chapterId || 0;
|
|
@@ -5540,6 +5602,7 @@ export default {
|
|
|
setTimeout(() => {
|
|
|
this.clickLock = false;
|
|
|
}, 3000);
|
|
|
+ this.studyLog(this.moduleId, this.chapterId, this.playSectionId)
|
|
|
// uni.$emit("levelId", this.levelId);
|
|
|
// uni.$emit("getSection", this.menuItem);
|
|
|
// uni.$emit("isRebuild", this.isRebuild);
|
|
@@ -5583,6 +5646,7 @@ export default {
|
|
|
sectionId: option.sectionId || option.menuId,
|
|
|
chapterId: option.chapterId || 0,
|
|
|
moduleId: option.moduleId || 0,
|
|
|
+ sectionType: 2,
|
|
|
},
|
|
|
});
|
|
|
// this.loadPlayerScriptzb(this.loadPlayerzb);
|
|
@@ -5662,6 +5726,7 @@ export default {
|
|
|
this.postStudyRecord(1);
|
|
|
});
|
|
|
},
|
|
|
+ // 播放视频
|
|
|
loadPlayer() {
|
|
|
var self = this;
|
|
|
const polyvPlayer = window.polyvPlayer;
|
|
@@ -6087,6 +6152,7 @@ export default {
|
|
|
console.log(this);
|
|
|
console.log(PlayDuration, "PlayDuration");
|
|
|
let data = {
|
|
|
+ fromPlat: 2, //来源平台 1小程序 2网站
|
|
|
photo: self.ossAvatarUrl,
|
|
|
sectionId: parseInt(this.playSectionId),
|
|
|
goodsId: parseInt(this.goodsId),
|
|
@@ -6103,6 +6169,7 @@ export default {
|
|
|
if (status > 0) {
|
|
|
data.status = status;
|
|
|
}
|
|
|
+ // /study/record 学习记录
|
|
|
this.$request
|
|
|
.studyRecord(data)
|
|
|
.then((res) => {
|
|
@@ -6127,6 +6194,7 @@ export default {
|
|
|
* 获取重修列表中是否有相同对象
|
|
|
*/
|
|
|
getSameObj(metaObj) {
|
|
|
+ console.log('看完视频后----', metaObj, this.reMenuList)
|
|
|
let newObj = false;
|
|
|
if (this.reMenuList.length) {
|
|
|
console.log(this.reMenuList, "this.reMenuList");
|
|
@@ -6187,7 +6255,7 @@ export default {
|
|
|
* 刷新父级列表
|
|
|
*/
|
|
|
refreshParentList(sectionItem, rebuildObj) {
|
|
|
- console.log(sectionItem, "sectionItem");
|
|
|
+ console.log(sectionItem, "看完视频==========sectionItem", this.menuList);
|
|
|
console.log(rebuildObj, "rebuildObj");
|
|
|
let self = this;
|
|
|
if (sectionItem.menuId) {
|
|
@@ -6265,6 +6333,7 @@ export default {
|
|
|
let newArr = res.data.filter((item) => {
|
|
|
return item.type != 2;
|
|
|
});
|
|
|
+ if (sectionItem.parent) {
|
|
|
sectionItem.parent.canLearn = newArr.every((item) => {
|
|
|
if (item.learning == 1) {
|
|
|
return true;
|
|
@@ -6276,7 +6345,7 @@ export default {
|
|
|
section.isRebuild = 1;
|
|
|
section.parent = sectionItem.parent;
|
|
|
});
|
|
|
-
|
|
|
+ }
|
|
|
this.menuList.forEach((menu) => {
|
|
|
if (menu.menuId == sectionItem.chapterId) {
|
|
|
menu.list = res.data;
|
|
@@ -6297,6 +6366,7 @@ export default {
|
|
|
let newArr = res.data.filter((item) => {
|
|
|
return item.type != 2;
|
|
|
});
|
|
|
+ if (rebuildObj.parent) {
|
|
|
rebuildObj.parent.canLearn = newArr.every((item) => {
|
|
|
if (item.learning == 1) {
|
|
|
return true;
|
|
@@ -6308,7 +6378,7 @@ export default {
|
|
|
res.data.forEach((section) => {
|
|
|
section.parent = rebuildObj.parent;
|
|
|
});
|
|
|
-
|
|
|
+ }
|
|
|
this.reMenuList.forEach((menu) => {
|
|
|
if (menu.menuId == rebuildObj.chapterId) {
|
|
|
menu.list = res.data;
|
|
@@ -6363,6 +6433,7 @@ export default {
|
|
|
}
|
|
|
} else {
|
|
|
//第三层节有moduleid和chapterid都有
|
|
|
+ console.log('第三层第三层')
|
|
|
this.$request
|
|
|
.reSectionList({
|
|
|
chapterId: sectionItem.chapterId,
|
|
@@ -6374,6 +6445,7 @@ export default {
|
|
|
let newArr = res.data.filter((item) => {
|
|
|
return item.type != 2;
|
|
|
});
|
|
|
+ if (sectionItem.parent) {
|
|
|
sectionItem.parent.canLearn = newArr.every((item) => {
|
|
|
if (item.learning == 1) {
|
|
|
return true;
|
|
@@ -6385,7 +6457,7 @@ export default {
|
|
|
res.data.forEach((section) => {
|
|
|
section.parent = sectionItem.parent;
|
|
|
});
|
|
|
-
|
|
|
+ }
|
|
|
this.menuList.forEach((menu) => {
|
|
|
if (menu.list && menu.list.length) {
|
|
|
menu.list.forEach((chapter) => {
|
|
@@ -6393,13 +6465,16 @@ export default {
|
|
|
chapter.moduleId == sectionItem.moduleId &&
|
|
|
chapter.chapterId == sectionItem.chapterId
|
|
|
) {
|
|
|
+ chapter.learning = res.data[0].learning
|
|
|
console.log(res.data, "res.data");
|
|
|
- console.log(chapter.list, "chapter.list");
|
|
|
chapter.list = res.data;
|
|
|
+ console.log(chapter.list, "chapter.list");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
|
|
|
if (this.menuTab.length > 1 && rebuildObj) {
|
|
@@ -6415,6 +6490,7 @@ export default {
|
|
|
let newArr = res.data.filter((item) => {
|
|
|
return item.type != 2;
|
|
|
});
|
|
|
+ if (sectionItem.parent) {
|
|
|
rebuildObj.parent.canLearn = newArr.every((item) => {
|
|
|
if (item.learning == 1) {
|
|
|
return true;
|
|
@@ -6426,7 +6502,7 @@ export default {
|
|
|
res.data.forEach((section) => {
|
|
|
section.parent = rebuildObj.parent;
|
|
|
});
|
|
|
-
|
|
|
+ }
|
|
|
this.reMenuList.forEach((menu) => {
|
|
|
if (menu.list && menu.list.length) {
|
|
|
menu.list.forEach((chapter) => {
|
|
@@ -6434,6 +6510,7 @@ export default {
|
|
|
chapter.moduleId == rebuildObj.moduleId &&
|
|
|
chapter.chapterId == rebuildObj.chapterId
|
|
|
) {
|
|
|
+ chapter.learning = res.data[0].learning
|
|
|
chapter.list = res.data;
|
|
|
}
|
|
|
});
|
|
@@ -6563,9 +6640,11 @@ export default {
|
|
|
*/
|
|
|
getMenuList() {
|
|
|
let self = this;
|
|
|
+ // /course/menuList
|
|
|
this.$request
|
|
|
.reMenuList({ courseId: this.courseId, gradeId: this.gradeId })
|
|
|
.then(async (res) => {
|
|
|
+ console.log('--asfsdgshfduofhdug', res.rows, this.menuList)
|
|
|
for (let i = 0; i < res.rows.length; i++) {
|
|
|
let item = res.rows[i];
|
|
|
item.id = item.menuId;
|
|
@@ -6576,6 +6655,7 @@ export default {
|
|
|
item.parent = this.menuList;
|
|
|
}
|
|
|
self.menuList = res.rows;
|
|
|
+ console.log('==============self.menuList===', res.rows, self.menuList)
|
|
|
if ((this.sectionItem.recordingUrl||this.sectionItem.liveUrl) && this.needOpenNew) {
|
|
|
this.needOpenNew = false;
|
|
|
if (this.sectionItem.sectionType == 1) {
|
|
@@ -6825,6 +6905,7 @@ export default {
|
|
|
},
|
|
|
getAnswerList() {
|
|
|
let self = this;
|
|
|
+ // /app/answer/list 查询答疑列表
|
|
|
this.$request
|
|
|
.answerList({ courseId: this.courseId, goodsId: this.goodsId })
|
|
|
.then((res) => {
|
|
@@ -6884,8 +6965,10 @@ export default {
|
|
|
this.param.goodsId = this.goodsId;
|
|
|
this.param.gradeId = this.gradeId;
|
|
|
this.$request.courseCourseList(this.param).then(async (res) => {
|
|
|
- console.log(res.rows, "resresresres");
|
|
|
+ console.log(res, "resresresres");
|
|
|
this.courseList.push(...res.rows);
|
|
|
+ this.courseTotal = res.total
|
|
|
+ // console.log('courseTotal::', this.courseTotal)
|
|
|
if (!this.courseId) {
|
|
|
this.courseId = this.courseList[0].courseId;
|
|
|
}
|