|
@@ -203,7 +203,7 @@
|
|
|
</template>
|
|
|
</template>
|
|
|
<el-tag v-else size="mini" effect="dark">{{
|
|
|
- getStudyStatus(item3)
|
|
|
+ getStudyStatus(item3)["name"]
|
|
|
}}</el-tag>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -312,7 +312,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if (item.sectionType == 2) {
|
|
|
+ console.log("aaasdasdasd", item, this.nowTime);
|
|
|
if (item.liveStartTime > this.nowTime) {
|
|
|
+ console.log("asdasdasd");
|
|
|
return {
|
|
|
name: "待开播",
|
|
|
style: "warning"
|
|
@@ -406,18 +408,11 @@ export default {
|
|
|
}
|
|
|
|
|
|
if (STATUSARRAY.every(i => i.studyStatus == 1)) {
|
|
|
- if (STATUSARRAY.findIndex(i => i.rebuild == 1) !== -1) {
|
|
|
- return {
|
|
|
- name: "待重修",
|
|
|
- style: "danger"
|
|
|
- };
|
|
|
- } else {
|
|
|
- return {
|
|
|
- name: "已学完",
|
|
|
- style: "success"
|
|
|
- };
|
|
|
- }
|
|
|
- } else if (STATUSARRAY.every(i => i.studyStatus == -1)) {
|
|
|
+ return {
|
|
|
+ name: "已学完",
|
|
|
+ style: "success"
|
|
|
+ };
|
|
|
+ } else {
|
|
|
return {
|
|
|
name: "待学习",
|
|
|
style: ""
|
|
@@ -450,6 +445,7 @@ export default {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
this.$request
|
|
|
.courseCourseList({
|
|
|
+ orderGoodsId: this.goodsData.orderGoodsId,
|
|
|
goodsId: this.goodsData.goodsId,
|
|
|
gradeId: this.goodsData.gradeId
|
|
|
})
|
|
@@ -495,6 +491,9 @@ export default {
|
|
|
sectionType: i.type == 3 ? i.sectionType : null,
|
|
|
durationTime: i.type == 3 ? i.durationTime : null,
|
|
|
recordingUrl: i.type == 3 ? i.recordingUrl : null,
|
|
|
+ liveUrl: i.type == 3 ? i.liveUrl : null,
|
|
|
+ liveStartTime: i.sectionType == 2 ? i.liveStartTime : null,
|
|
|
+ liveEndTime: i.sectionType == 2 ? i.liveEndTime : null,
|
|
|
showStatus: false, //展开状态
|
|
|
children: null, //子列表
|
|
|
learning: i.type == 3 ? i.learning : null,
|
|
@@ -509,9 +508,9 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
//展开模块
|
|
|
- openModule(item) {
|
|
|
+ openModule(item, status = false) {
|
|
|
if (item.children && item.children.length > 0) {
|
|
|
- item.showStatus = !item.showStatus;
|
|
|
+ item.showStatus = status ? true : !item.showStatus;
|
|
|
} else {
|
|
|
return new Promise(resolve => {
|
|
|
this.$request
|
|
@@ -559,10 +558,15 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//展开章
|
|
|
- openChapter(item) {
|
|
|
+ /**
|
|
|
+ * status = true ? '强制展开'
|
|
|
+ * renewal = true ? '重新获取数据'
|
|
|
+ */
|
|
|
+ openChapter(item, status = false, renewal = false) {
|
|
|
if (item.children && item.children.length > 0) {
|
|
|
- item.showStatus = !item.showStatus;
|
|
|
- } else {
|
|
|
+ item.showStatus = item.showStatus = status ? true : !item.showStatus;
|
|
|
+ }
|
|
|
+ if (!(item.children && item.children.length > 0) || renewal) {
|
|
|
return new Promise(async resolve => {
|
|
|
const examRes = await this.$request.reSectionExamList({
|
|
|
moduleId: item.moduleId,
|
|
@@ -598,6 +602,10 @@ export default {
|
|
|
sectionType: i.sectionType,
|
|
|
durationTime: i.durationTime,
|
|
|
recordingUrl: i.recordingUrl,
|
|
|
+ liveUrl: i.liveUrl,
|
|
|
+ liveStartTime:
|
|
|
+ i.sectionType == 2 ? i.liveStartTime : null,
|
|
|
+ liveEndTime: i.sectionType == 2 ? i.liveEndTime : null,
|
|
|
learning: i.learning,
|
|
|
rebuild: i.rebuild,
|
|
|
showStatus: false, //展开状态
|
|
@@ -750,9 +758,23 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- this.toPlaySection(item);
|
|
|
+ var query = {
|
|
|
+ goodsName: this.goodsData.name,
|
|
|
+ goodsId: this.goodsData.goodsId,
|
|
|
+ gradeId: this.goodsData.gradeId,
|
|
|
+ orderGoodsId: this.goodsData.orderGoodsId,
|
|
|
+ courseId: this.courseId,
|
|
|
+ sectionId: item.sectionId,
|
|
|
+ chapterId: item.chapterId,
|
|
|
+ moduleId: item.moduleId,
|
|
|
+ sectionType: item.sectionType,
|
|
|
+ vid: item.recordingUrl // 回放vid
|
|
|
+ };
|
|
|
+ this.$router.push({
|
|
|
+ path: "/living-room/" + item.liveUrl,
|
|
|
+ query
|
|
|
+ });
|
|
|
},
|
|
|
- toPlaySection(item) {},
|
|
|
//跳转试卷
|
|
|
async doExam(section, type) {
|
|
|
// 试卷学习次数
|
|
@@ -863,6 +885,7 @@ export default {
|
|
|
this.$request
|
|
|
.goodsTodayStudySectionNum({
|
|
|
goodsId: this.goodsData.goodsId,
|
|
|
+ orderGoodsId: this.goodsData.orderGoodsId,
|
|
|
gradeId: this.goodsData.gradeId
|
|
|
})
|
|
|
.then(res => {
|
|
@@ -876,6 +899,7 @@ export default {
|
|
|
type: option.type == -1 ? 2 : 1,
|
|
|
goodsId: this.goodsData.goodsId,
|
|
|
gradeId: this.goodsData.gradeId,
|
|
|
+ orderGoodsId: this.goodsData.orderGoodsId,
|
|
|
moduleId: option.moduleId || 0,
|
|
|
chapterId: option.chapterId || 0
|
|
|
};
|
|
@@ -894,6 +918,7 @@ export default {
|
|
|
this.$request
|
|
|
.bankRecordDoNum({
|
|
|
goodsId: this.goodsData.goodsId,
|
|
|
+ orderGoodsId: this.goodsData.orderGoodsId,
|
|
|
gradeId: this.goodsData.gradeId,
|
|
|
courseId: this.courseList[0].courseId,
|
|
|
moduleId: 0,
|
|
@@ -945,68 +970,86 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//展开定位列表
|
|
|
- async unfoldFunc(item) {
|
|
|
+ async unfoldFunc(item, status = false, Renewal = false) {
|
|
|
if (item.moduleId) {
|
|
|
- var ary = this.courseDataList.find(i => i.moduleId == item.moduleId);
|
|
|
- let moduleChildren = await this.openModule(ary);
|
|
|
+ let moduleChildren = await this.openModule(
|
|
|
+ this.courseDataList.find(i => i.moduleId == item.moduleId),
|
|
|
+ status
|
|
|
+ );
|
|
|
if (item.chapterId) {
|
|
|
await this.openChapter(
|
|
|
- moduleChildren.find(i => i.chapterId == item.chapterId)
|
|
|
+ moduleChildren.find(i => i.chapterId == item.chapterId),
|
|
|
+ status,
|
|
|
+ Renewal
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
if (!item.moduleId && item.chapterId) {
|
|
|
- var ary = this.courseDataList.find(i => i.chapterId == item.chapterId);
|
|
|
- await this.openChapter(ary);
|
|
|
+ await this.openChapter(
|
|
|
+ this.courseDataList.find(i => i.chapterId == item.chapterId),
|
|
|
+ status,
|
|
|
+ Renewal
|
|
|
+ );
|
|
|
}
|
|
|
},
|
|
|
//已学完,重新定位
|
|
|
BackVideoFunc() {
|
|
|
+ this.unfoldFunc(this.activeSection, true, true);
|
|
|
if (this.businessData.goodsLearningOrder == 2) {
|
|
|
- let ary = this.allSectionList.find(i => i.studyStatus != 1);
|
|
|
- if (ary) {
|
|
|
- if (ary.type != 3) {
|
|
|
- this.$confirm(
|
|
|
- "本章视频已学习完成,继续进行下一个考试?",
|
|
|
- "温馨提示",
|
|
|
- {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }
|
|
|
- )
|
|
|
- .then(() => {
|
|
|
- // this.openMenu(ary);
|
|
|
- // this.unfoldFunc(ary);
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
- } else {
|
|
|
- this.$confirm("当前视频已学完,继续学习下一个视频?", "温馨提示", {
|
|
|
+ var ary = this.allSectionList.find(i => i.studyStatus != 1);
|
|
|
+ } else {
|
|
|
+ var ary = null;
|
|
|
+ let index = this.allSectionList.findIndex(
|
|
|
+ i =>
|
|
|
+ i.courseId == this.activeSection.courseId &&
|
|
|
+ i.moduleId == this.activeSection.moduleId &&
|
|
|
+ i.chapterId == this.activeSection.chapterId &&
|
|
|
+ i.sectionId == this.activeSection.sectionId
|
|
|
+ );
|
|
|
+ ary = this.allSectionList[index + 1];
|
|
|
+ }
|
|
|
+ if (ary) {
|
|
|
+ if (ary.type != 3) {
|
|
|
+ this.$confirm(
|
|
|
+ "本章视频已学习完成,继续进行下一个考试?",
|
|
|
+ "温馨提示",
|
|
|
+ {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(() => {
|
|
|
+ this.openMenu(ary);
|
|
|
+ this.unfoldFunc(ary, true);
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- // this.openMenu(ary);
|
|
|
- // this.unfoldFunc(ary);
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
- }
|
|
|
+ .catch(() => {});
|
|
|
} else {
|
|
|
- this.$alert(
|
|
|
- "恭喜您课程学习全部完成,教务会在1-3个工作日内完成学习初审,请耐心等待。",
|
|
|
- "温馨提示",
|
|
|
- {
|
|
|
- confirmButtonText: "确定",
|
|
|
- showClose: false,
|
|
|
- callback: action => {
|
|
|
- if (action == "confirm") {
|
|
|
- this.jumpPage();
|
|
|
- }
|
|
|
+ this.$confirm("当前视频已学完,继续学习下一个视频?", "温馨提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.openMenu(ary);
|
|
|
+ this.unfoldFunc(ary, true);
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$alert(
|
|
|
+ "恭喜您课程学习全部完成,教务会在1-3个工作日内完成学习初审,请耐心等待。",
|
|
|
+ "温馨提示",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ showClose: false,
|
|
|
+ callback: action => {
|
|
|
+ if (action == "confirm") {
|
|
|
+ this.jumpPage();
|
|
|
}
|
|
|
}
|
|
|
- );
|
|
|
- }
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
},
|
|
|
//回到个人中心
|