|
@@ -28,7 +28,7 @@
|
|
:menuItem="itemM"
|
|
:menuItem="itemM"
|
|
:levelId="levelId + '-' + itemM.sectionId"
|
|
:levelId="levelId + '-' + itemM.sectionId"
|
|
:testType="2"
|
|
:testType="2"
|
|
- :sectionExam='sectionExam'
|
|
|
|
|
|
+ :ChapterSectionExam='sectionExam'
|
|
@togoBack='togoBack()'
|
|
@togoBack='togoBack()'
|
|
></courseSection>
|
|
></courseSection>
|
|
<u-line v-if="indexM < list.length - 1"></u-line>
|
|
<u-line v-if="indexM < list.length - 1"></u-line>
|
|
@@ -163,8 +163,8 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...mapMutations(["updateChapterOpen"]),
|
|
...mapMutations(["updateChapterOpen"]),
|
|
|
|
+ // 调用节的方法
|
|
togoBack(value) {
|
|
togoBack(value) {
|
|
- console.log('章的节', value , this.$refs.ChapterSection)
|
|
|
|
this.$refs.ChapterSection[0].ChapterExam()
|
|
this.$refs.ChapterSection[0].ChapterExam()
|
|
},
|
|
},
|
|
goodsTodayStudySectionNum() {
|
|
goodsTodayStudySectionNum() {
|
|
@@ -182,7 +182,6 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
refreshList(isRebuild) {
|
|
refreshList(isRebuild) {
|
|
- console.log(9999);
|
|
|
|
let moduleId = this.menuItem.moduleId ? this.menuItem.moduleId : 0;
|
|
let moduleId = this.menuItem.moduleId ? this.menuItem.moduleId : 0;
|
|
if (this.isRebuild) {
|
|
if (this.isRebuild) {
|
|
this.getReSectionList(
|
|
this.getReSectionList(
|
|
@@ -200,7 +199,6 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
this.$emit("playEnd", { isRebuild: isRebuild.isRebuild });
|
|
this.$emit("playEnd", { isRebuild: isRebuild.isRebuild });
|
|
- console.log(10000);
|
|
|
|
// let moduleId = this.menuItem.moduleId?this.menuItem.moduleId:0
|
|
// let moduleId = this.menuItem.moduleId?this.menuItem.moduleId:0
|
|
// this.getBuySectionList(this.menuItem.id,this.menuItem.courseId,moduleId)
|
|
// this.getBuySectionList(this.menuItem.id,this.menuItem.courseId,moduleId)
|
|
},
|
|
},
|
|
@@ -278,14 +276,14 @@ export default {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- console.log(this.learningOrder, "this.learningOrder");
|
|
|
|
|
|
+ // console.log(this.learningOrder, "this.learningOrder");
|
|
if (this.learningOrder == 1) {
|
|
if (this.learningOrder == 1) {
|
|
if (this.canLearn) {
|
|
if (this.canLearn) {
|
|
let num = await this.bankRecordDoNum(item.typeId);
|
|
let num = await this.bankRecordDoNum(item.typeId);
|
|
//有次数限制
|
|
//有次数限制
|
|
if (item.answerNum - num > 0 && item.answerNum > 0) {
|
|
if (item.answerNum - num > 0 && item.answerNum > 0) {
|
|
// this.$set(this.list[index],'doNum',(item.doNum+1))
|
|
// this.$set(this.list[index],'doNum',(item.doNum+1))
|
|
- console.log(this.list[index]);
|
|
|
|
|
|
+ // console.log(this.list[index]);
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url:
|
|
url:
|
|
"/pages2/class/questionBank?courseId=" +
|
|
"/pages2/class/questionBank?courseId=" +
|
|
@@ -301,7 +299,9 @@ export default {
|
|
"&chapterId=" +
|
|
"&chapterId=" +
|
|
chapterId +
|
|
chapterId +
|
|
"&orderGoodsId=" +
|
|
"&orderGoodsId=" +
|
|
- this.orderGoodsId,
|
|
|
|
|
|
+ this.orderGoodsId +
|
|
|
|
+ "&types=1"
|
|
|
|
+ ,
|
|
});
|
|
});
|
|
this.studyLog()
|
|
this.studyLog()
|
|
//没有答题次数限制
|
|
//没有答题次数限制
|
|
@@ -321,7 +321,8 @@ export default {
|
|
"&chapterId=" +
|
|
"&chapterId=" +
|
|
chapterId +
|
|
chapterId +
|
|
"&orderGoodsId=" +
|
|
"&orderGoodsId=" +
|
|
- this.orderGoodsId,
|
|
|
|
|
|
+ this.orderGoodsId +
|
|
|
|
+ "&types=1",
|
|
});
|
|
});
|
|
this.studyLog()
|
|
this.studyLog()
|
|
} else {
|
|
} else {
|
|
@@ -363,7 +364,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- console.log(newRows);
|
|
|
|
|
|
+ // console.log(newRows);
|
|
let isAllLearn = newRows.every((item) => {
|
|
let isAllLearn = newRows.every((item) => {
|
|
return item.studyStatus == 1;
|
|
return item.studyStatus == 1;
|
|
});
|
|
});
|
|
@@ -377,7 +378,7 @@ export default {
|
|
//有次数限制
|
|
//有次数限制
|
|
if (item.answerNum - num > 0 && item.answerNum > 0) {
|
|
if (item.answerNum - num > 0 && item.answerNum > 0) {
|
|
// this.$set(this.list[index],'doNum',(item.doNum+1))
|
|
// this.$set(this.list[index],'doNum',(item.doNum+1))
|
|
- console.log(this.list[index]);
|
|
|
|
|
|
+ // console.log(this.list[index]);
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url:
|
|
url:
|
|
"/pages2/class/questionBank?courseId=" +
|
|
"/pages2/class/questionBank?courseId=" +
|
|
@@ -393,7 +394,8 @@ export default {
|
|
"&chapterId=" +
|
|
"&chapterId=" +
|
|
chapterId +
|
|
chapterId +
|
|
"&orderGoodsId=" +
|
|
"&orderGoodsId=" +
|
|
- this.orderGoodsId,
|
|
|
|
|
|
+ this.orderGoodsId +
|
|
|
|
+ "&types=1",
|
|
});
|
|
});
|
|
this.studyLog()
|
|
this.studyLog()
|
|
//没有答题次数限制
|
|
//没有答题次数限制
|
|
@@ -413,7 +415,8 @@ export default {
|
|
"&chapterId=" +
|
|
"&chapterId=" +
|
|
chapterId +
|
|
chapterId +
|
|
"&orderGoodsId=" +
|
|
"&orderGoodsId=" +
|
|
- this.orderGoodsId,
|
|
|
|
|
|
+ this.orderGoodsId +
|
|
|
|
+ "&types=1",
|
|
});
|
|
});
|
|
this.studyLog()
|
|
this.studyLog()
|
|
} else {
|
|
} else {
|
|
@@ -435,7 +438,7 @@ export default {
|
|
//有次数限制
|
|
//有次数限制
|
|
if (item.answerNum - item.doNum > 0 && item.answerNum > 0) {
|
|
if (item.answerNum - item.doNum > 0 && item.answerNum > 0) {
|
|
// this.$set(this.list[index],'doNum',(item.doNum+1))
|
|
// this.$set(this.list[index],'doNum',(item.doNum+1))
|
|
- console.log(this.list[index]);
|
|
|
|
|
|
+ // console.log(this.list[index]);
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url:
|
|
url:
|
|
"/pages2/class/questionBank?courseId=" +
|
|
"/pages2/class/questionBank?courseId=" +
|
|
@@ -451,7 +454,8 @@ export default {
|
|
"&chapterId=" +
|
|
"&chapterId=" +
|
|
chapterId +
|
|
chapterId +
|
|
"&orderGoodsId=" +
|
|
"&orderGoodsId=" +
|
|
- this.orderGoodsId,
|
|
|
|
|
|
+ this.orderGoodsId +
|
|
|
|
+ "&types=1",
|
|
});
|
|
});
|
|
this.studyLog()
|
|
this.studyLog()
|
|
//没有答题次数限制
|
|
//没有答题次数限制
|
|
@@ -471,7 +475,8 @@ export default {
|
|
"&chapterId=" +
|
|
"&chapterId=" +
|
|
chapterId +
|
|
chapterId +
|
|
"&orderGoodsId=" +
|
|
"&orderGoodsId=" +
|
|
- this.orderGoodsId,
|
|
|
|
|
|
+ this.orderGoodsId +
|
|
|
|
+ "&types=1",
|
|
});
|
|
});
|
|
this.studyLog()
|
|
this.studyLog()
|
|
} else {
|
|
} else {
|
|
@@ -501,11 +506,11 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
async openChapter(item) {
|
|
async openChapter(item) {
|
|
- console.log('---zhang',this.menuItem, this.down,this.list, item.id, item.courseId, item.moduleId);
|
|
|
|
|
|
+ // console.log('---zhang',this.menuItem, this.down,this.list, item.id, item.courseId, item.moduleId);
|
|
this.down = !this.down;
|
|
this.down = !this.down;
|
|
if (!this.down && this.list.length == 0) {
|
|
if (!this.down && this.list.length == 0) {
|
|
- console.log(item.id, 69);
|
|
|
|
- //获取所有节试卷列表
|
|
|
|
|
|
+ // console.log(item.id, 69);
|
|
|
|
+ //获取章下面所有节试卷列表
|
|
await this.$api.reSectionExamList({
|
|
await this.$api.reSectionExamList({
|
|
chapterId: item.chapterId || item.menuId,
|
|
chapterId: item.chapterId || item.menuId,
|
|
courseId: item.courseId,
|
|
courseId: item.courseId,
|
|
@@ -545,7 +550,6 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
getSectionList(chapterId) {
|
|
getSectionList(chapterId) {
|
|
- console.log('=============2', 'chapterId:', 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) => {
|
|
@@ -562,11 +566,9 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
let newArr = res.data.data.filter((item) => {
|
|
let newArr = res.data.data.filter((item) => {
|
|
- console.log(item);
|
|
|
|
return item.type != 2;
|
|
return item.type != 2;
|
|
});
|
|
});
|
|
this.canLearn = newArr.every((item) => {
|
|
this.canLearn = newArr.every((item) => {
|
|
- console.log(item);
|
|
|
|
if (item.learning == 1) {
|
|
if (item.learning == 1) {
|
|
return true;
|
|
return true;
|
|
} else {
|
|
} else {
|
|
@@ -574,12 +576,12 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
self.list = res.data.data;
|
|
self.list = res.data.data;
|
|
- console.log('=============2', self.list)
|
|
|
|
|
|
+ // console.log('=============2', self.list)
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
getReSectionList(chapterId, courseId, moduleId) {
|
|
getReSectionList(chapterId, courseId, moduleId) {
|
|
- console.log('=============3', 'chapterId:', chapterId, 'courseId:', courseId, 'moduleId:', moduleId)
|
|
|
|
|
|
+ // console.log('=============3', 'chapterId:', chapterId, 'courseId:', courseId, 'moduleId:', moduleId)
|
|
let self = this;
|
|
let self = this;
|
|
this.$api
|
|
this.$api
|
|
.reSectionList({
|
|
.reSectionList({
|
|
@@ -602,11 +604,9 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let newArr = res.data.data.filter((item) => {
|
|
let newArr = res.data.data.filter((item) => {
|
|
- console.log(item);
|
|
|
|
return item.type != 2;
|
|
return item.type != 2;
|
|
});
|
|
});
|
|
this.canLearn = newArr.every((item) => {
|
|
this.canLearn = newArr.every((item) => {
|
|
- console.log(item);
|
|
|
|
if (item.learning == 1) {
|
|
if (item.learning == 1) {
|
|
return true;
|
|
return true;
|
|
} else {
|
|
} else {
|
|
@@ -614,12 +614,11 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
self.list = res.data.data;
|
|
self.list = res.data.data;
|
|
- console.log('=============3', self.list)
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
getBuySectionList(chapterId, courseId, moduleId) {
|
|
getBuySectionList(chapterId, courseId, moduleId) {
|
|
- console.log('=============1', 'chapterId:', chapterId, 'courseId:', courseId, 'moduleId:', moduleId)
|
|
|
|
|
|
+ // console.log('=============1', 'chapterId:', chapterId, 'courseId:', courseId, 'moduleId:', moduleId)
|
|
let self = this;
|
|
let self = this;
|
|
this.$api
|
|
this.$api
|
|
.reSectionList({
|
|
.reSectionList({
|
|
@@ -644,7 +643,6 @@ export default {
|
|
return item.type != 2;
|
|
return item.type != 2;
|
|
});
|
|
});
|
|
this.canLearn = newArr.every((item) => {
|
|
this.canLearn = newArr.every((item) => {
|
|
- console.log(item);
|
|
|
|
if (item.learning == 1) {
|
|
if (item.learning == 1) {
|
|
return true;
|
|
return true;
|
|
} else {
|
|
} else {
|
|
@@ -652,7 +650,6 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
self.list = res.data.data;
|
|
self.list = res.data.data;
|
|
- console.log('=============1', self.list)
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|