|
@@ -25,7 +25,7 @@
|
|
:menuItem="itemM"
|
|
:menuItem="itemM"
|
|
:levelId="levelId + '-' + itemM.sectionId"
|
|
:levelId="levelId + '-' + itemM.sectionId"
|
|
:testType="2"
|
|
:testType="2"
|
|
- :ChapterSectionExam='sectionExam'
|
|
|
|
|
|
+ :ChapterSectionExam="sectionExam"
|
|
:menuAllList="menuAllList"
|
|
:menuAllList="menuAllList"
|
|
></courseSection>
|
|
></courseSection>
|
|
<!-- @togoBack='togoBack()' -->
|
|
<!-- @togoBack='togoBack()' -->
|
|
@@ -129,19 +129,20 @@ export default {
|
|
sectionMaxNum: {
|
|
sectionMaxNum: {
|
|
default: undefined,
|
|
default: undefined,
|
|
},
|
|
},
|
|
- // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
|
|
|
|
|
|
+ // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
|
|
goodsType: {
|
|
goodsType: {
|
|
type: [Number, String],
|
|
type: [Number, String],
|
|
default: 0,
|
|
default: 0,
|
|
- },
|
|
|
|
- menuAllList: { // 课程所有子目录结构列表
|
|
|
|
- type: Array,
|
|
|
|
- default: () => []
|
|
|
|
- },
|
|
|
|
|
|
+ },
|
|
|
|
+ menuAllList: {
|
|
|
|
+ // 课程所有子目录结构列表
|
|
|
|
+ type: Array,
|
|
|
|
+ default: () => [],
|
|
|
|
+ },
|
|
// sectionItem: { // 用户最后一次看的录播的信息
|
|
// sectionItem: { // 用户最后一次看的录播的信息
|
|
- // type: Object,
|
|
|
|
- // default: () => {}
|
|
|
|
- // },
|
|
|
|
|
|
+ // type: Object,
|
|
|
|
+ // default: () => {}
|
|
|
|
+ // },
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
courseSection,
|
|
courseSection,
|
|
@@ -156,8 +157,7 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onLoad() {},
|
|
onLoad() {},
|
|
- created() {
|
|
|
|
- },
|
|
|
|
|
|
+ created() {},
|
|
mounted() {
|
|
mounted() {
|
|
// console.log('needOpen:', this.needOpen, this.chapterOpen);
|
|
// console.log('needOpen:', this.needOpen, this.chapterOpen);
|
|
if (this.needOpen && this.chapterOpen) {
|
|
if (this.needOpen && this.chapterOpen) {
|
|
@@ -256,26 +256,29 @@ export default {
|
|
// 新增用户视频学习日志
|
|
// 新增用户视频学习日志
|
|
studyLog() {
|
|
studyLog() {
|
|
this.$http({
|
|
this.$http({
|
|
- url: '/user/study/log',
|
|
|
|
- method: 'post',
|
|
|
|
|
|
+ url: "/user/study/log",
|
|
|
|
+ method: "post",
|
|
data: {
|
|
data: {
|
|
goodsId: this.goodsId,
|
|
goodsId: this.goodsId,
|
|
courseId: this.courseId,
|
|
courseId: this.courseId,
|
|
- moduleId: this.menuItem.moduleId || 0,
|
|
|
|
- chapterId: this.menuItem.chapterId || 0,
|
|
|
|
|
|
+ moduleId: this.menuItem.moduleId || 0,
|
|
|
|
+ chapterId: this.menuItem.chapterId || 0,
|
|
sectionId: this.menuItem.sectionId || this.menuItem.menuId,
|
|
sectionId: this.menuItem.sectionId || this.menuItem.menuId,
|
|
fromPlat: 1, //来源平台 1小程序 2PC网站
|
|
fromPlat: 1, //来源平台 1小程序 2PC网站
|
|
goodsType: this.goodsType, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
|
|
goodsType: this.goodsType, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
|
|
orderGoodsId: this.orderGoodsId,
|
|
orderGoodsId: this.orderGoodsId,
|
|
- }
|
|
|
|
|
|
+ },
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
- console.log('考试的用户学习日志:', res)
|
|
|
|
- })
|
|
|
|
|
|
+ console.log("考试的用户学习日志:", res);
|
|
|
|
+ });
|
|
},
|
|
},
|
|
/**
|
|
/**
|
|
* 去做题
|
|
* 去做题
|
|
*/
|
|
*/
|
|
async toDo(id, goodsId = 0, moduleId = 0, chapterId = 0, item, index) {
|
|
async toDo(id, goodsId = 0, moduleId = 0, chapterId = 0, item, index) {
|
|
|
|
+ if (item.doType === 2 && item.learning == 1) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
// 查询用户商品今天学习节数- /goods/todayStudySectionNum
|
|
// 查询用户商品今天学习节数- /goods/todayStudySectionNum
|
|
let learnNum = await this.goodsTodayStudySectionNum();
|
|
let learnNum = await this.goodsTodayStudySectionNum();
|
|
// 检查用户是否学习过节 - /grade/grade/checkGoodsStudy
|
|
// 检查用户是否学习过节 - /grade/grade/checkGoodsStudy
|
|
@@ -313,10 +316,13 @@ export default {
|
|
chapterId +
|
|
chapterId +
|
|
"&orderGoodsId=" +
|
|
"&orderGoodsId=" +
|
|
this.orderGoodsId +
|
|
this.orderGoodsId +
|
|
- "&type=1" + '&learning=' + item.learning
|
|
|
|
- ,
|
|
|
|
|
|
+ "&type=1" +
|
|
|
|
+ "&learning=" +
|
|
|
|
+ item.learning +
|
|
|
|
+ "&isBackVideo=" +
|
|
|
|
+ 1,
|
|
});
|
|
});
|
|
- this.studyLog()
|
|
|
|
|
|
+ this.studyLog();
|
|
//没有答题次数限制
|
|
//没有答题次数限制
|
|
} else if (item.answerNum == 0) {
|
|
} else if (item.answerNum == 0) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
@@ -335,9 +341,13 @@ export default {
|
|
chapterId +
|
|
chapterId +
|
|
"&orderGoodsId=" +
|
|
"&orderGoodsId=" +
|
|
this.orderGoodsId +
|
|
this.orderGoodsId +
|
|
- "&type=1" + '&learning=' + item.learning,
|
|
|
|
|
|
+ "&type=1" +
|
|
|
|
+ "&learning=" +
|
|
|
|
+ item.learning +
|
|
|
|
+ "&isBackVideo=" +
|
|
|
|
+ 1,
|
|
});
|
|
});
|
|
- this.studyLog()
|
|
|
|
|
|
+ this.studyLog();
|
|
} else {
|
|
} else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
icon: "none",
|
|
icon: "none",
|
|
@@ -355,7 +365,7 @@ export default {
|
|
} else if (this.learningOrder == 2 && !item.rebuild) {
|
|
} else if (this.learningOrder == 2 && !item.rebuild) {
|
|
let canLearn = this.list[index - 1].learning == 1;
|
|
let canLearn = this.list[index - 1].learning == 1;
|
|
|
|
|
|
- let rows = this.menuAllList
|
|
|
|
|
|
+ let rows = this.menuAllList;
|
|
let isStop = false;
|
|
let isStop = false;
|
|
let newRows = [];
|
|
let newRows = [];
|
|
for (let i = 0; i < rows.length; i++) {
|
|
for (let i = 0; i < rows.length; i++) {
|
|
@@ -408,9 +418,13 @@ export default {
|
|
chapterId +
|
|
chapterId +
|
|
"&orderGoodsId=" +
|
|
"&orderGoodsId=" +
|
|
this.orderGoodsId +
|
|
this.orderGoodsId +
|
|
- "&type=1" + '&learning=' + item.learning,
|
|
|
|
|
|
+ "&type=1" +
|
|
|
|
+ "&learning=" +
|
|
|
|
+ item.learning +
|
|
|
|
+ "&isBackVideo=" +
|
|
|
|
+ 1,
|
|
});
|
|
});
|
|
- this.studyLog()
|
|
|
|
|
|
+ this.studyLog();
|
|
//没有答题次数限制
|
|
//没有答题次数限制
|
|
} else if (item.answerNum == 0) {
|
|
} else if (item.answerNum == 0) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
@@ -429,9 +443,13 @@ export default {
|
|
chapterId +
|
|
chapterId +
|
|
"&orderGoodsId=" +
|
|
"&orderGoodsId=" +
|
|
this.orderGoodsId +
|
|
this.orderGoodsId +
|
|
- "&type=1" + '&learning=' + item.learning,
|
|
|
|
|
|
+ "&type=1" +
|
|
|
|
+ "&learning=" +
|
|
|
|
+ item.learning +
|
|
|
|
+ "&isBackVideo=" +
|
|
|
|
+ 1,
|
|
});
|
|
});
|
|
- this.studyLog()
|
|
|
|
|
|
+ this.studyLog();
|
|
} else {
|
|
} else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
icon: "none",
|
|
icon: "none",
|
|
@@ -468,9 +486,13 @@ export default {
|
|
chapterId +
|
|
chapterId +
|
|
"&orderGoodsId=" +
|
|
"&orderGoodsId=" +
|
|
this.orderGoodsId +
|
|
this.orderGoodsId +
|
|
- "&type=1" + '&learning=' + item.learning,
|
|
|
|
|
|
+ "&type=1" +
|
|
|
|
+ "&learning=" +
|
|
|
|
+ item.learning +
|
|
|
|
+ "&isBackVideo=" +
|
|
|
|
+ 1,
|
|
});
|
|
});
|
|
- this.studyLog()
|
|
|
|
|
|
+ this.studyLog();
|
|
//没有答题次数限制
|
|
//没有答题次数限制
|
|
} else if (item.answerNum == 0) {
|
|
} else if (item.answerNum == 0) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
@@ -489,9 +511,13 @@ export default {
|
|
chapterId +
|
|
chapterId +
|
|
"&orderGoodsId=" +
|
|
"&orderGoodsId=" +
|
|
this.orderGoodsId +
|
|
this.orderGoodsId +
|
|
- "&type=1" + '&learning=' + item.learning,
|
|
|
|
|
|
+ "&type=1" +
|
|
|
|
+ "&learning=" +
|
|
|
|
+ item.learning +
|
|
|
|
+ "&isBackVideo=" +
|
|
|
|
+ 1,
|
|
});
|
|
});
|
|
- this.studyLog()
|
|
|
|
|
|
+ this.studyLog();
|
|
} else {
|
|
} else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
icon: "none",
|
|
icon: "none",
|
|
@@ -524,20 +550,23 @@ export default {
|
|
if (!this.down && this.list.length == 0) {
|
|
if (!this.down && this.list.length == 0) {
|
|
// console.log(item.id, 69);
|
|
// console.log(item.id, 69);
|
|
//获取章下面所有节试卷列表-course/sectionExamList
|
|
//获取章下面所有节试卷列表-course/sectionExamList
|
|
-
|
|
|
|
- this.$method.isLogin() && await this.$api.reSectionExamList({
|
|
|
|
- chapterId: item.chapterId || item.menuId,
|
|
|
|
- courseId: item.courseId,
|
|
|
|
- gradeId: item.gradeId
|
|
|
|
- }).then((res) => {
|
|
|
|
- if (res.data.code == 200) {
|
|
|
|
- this.sectionExam = res.data.data || []
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+
|
|
|
|
+ this.$method.isLogin() &&
|
|
|
|
+ (await this.$api
|
|
|
|
+ .reSectionExamList({
|
|
|
|
+ chapterId: item.chapterId || item.menuId,
|
|
|
|
+ courseId: item.courseId,
|
|
|
|
+ gradeId: item.gradeId,
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ this.sectionExam = res.data.data || [];
|
|
|
|
+ }
|
|
|
|
+ }));
|
|
|
|
|
|
if (this.isBuy) {
|
|
if (this.isBuy) {
|
|
let moduleId = item.moduleId ? item.moduleId : 0;
|
|
let moduleId = item.moduleId ? item.moduleId : 0;
|
|
- let chapterId = item.chapterId || item.id
|
|
|
|
|
|
+ let chapterId = item.chapterId || item.id;
|
|
if (this.isRebuild) {
|
|
if (this.isRebuild) {
|
|
this.getReSectionList(chapterId, item.courseId, moduleId);
|
|
this.getReSectionList(chapterId, item.courseId, moduleId);
|
|
} else {
|
|
} else {
|
|
@@ -566,7 +595,7 @@ export default {
|
|
},
|
|
},
|
|
getSectionList(chapterId) {
|
|
getSectionList(chapterId) {
|
|
let self = this;
|
|
let self = this;
|
|
- // url: '/app/common/course/sectionList/'+data,
|
|
|
|
|
|
+ // url: '/app/common/course/sectionList/'+data,
|
|
this.$api.sectionList(chapterId).then((res) => {
|
|
this.$api.sectionList(chapterId).then((res) => {
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
for (let i = 0; i < res.data.data.length; i++) {
|
|
for (let i = 0; i < res.data.data.length; i++) {
|
|
@@ -723,7 +752,7 @@ export default {
|
|
height: 78rpx;
|
|
height: 78rpx;
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
- border-bottom: 1rpx solid #EEEEEE;
|
|
|
|
|
|
+ border-bottom: 1rpx solid #eeeeee;
|
|
.menu_name {
|
|
.menu_name {
|
|
font-size: 24rpx;
|
|
font-size: 24rpx;
|
|
font-family: PingFang SC;
|
|
font-family: PingFang SC;
|