diff --git a/pages/course/courseDetail.vue b/pages/course/courseDetail.vue
index 17a9d36..c7ef044 100644
--- a/pages/course/courseDetail.vue
+++ b/pages/course/courseDetail.vue
@@ -230,6 +230,8 @@
续费
+ 复读
@@ -623,6 +625,7 @@
list: "sociology/course/getCourseDetail",
goodsList: "sociology/product/getProductListForCourse",
startStudyForMF: "sociology/course/startStudyForMF",
+ newPayment:"common/courseRelearn/courseCatalogueCanRelearn", // 复读地址
},
isAndorid: true,
oprateOsName: '',
@@ -638,6 +641,7 @@
showNextTestDate: undefined,
canJoinTestTime: false, //时间上是否可以参加自考考试
courseCompletion: undefined, // 课程学习进度
+ showNewPayBtn:false,
};
},
//第一次加载
@@ -663,7 +667,7 @@
}
},
computed: {
- ...mapState(["userInfo"]),
+ ...mapState(["userInfo"]),
},
//页面显示
async onShow() {
@@ -1119,6 +1123,37 @@
this.pricespop = false;
this.protocolShow = true;
},
+ // 查询目录续费情况
+ async checkRenewPayment(id){
+ console.log('999999999999999999999999999');
+ var ss = false
+ await this.$http
+ .request({
+ url: this.urlList.newPayment,
+ method: "POST",
+ data: {
+ courseCatalogueId: id,
+ },
+ header: {
+ //默认 无 说明:请求头
+ "Content-Type": "application/json",
+ },
+ })
+ .then(async (res) => {
+ console.log("res at line 493:", res);
+ if(res.code != 0){return this.$commonJS.showToast(res.errMsg);}
+ if (res.code == 0) {
+ ss = res.canRelearn
+ }
+ this.$forceUpdate();
+ }).catch(e => {
+ console.log('e',e);
+ ss = false
+ this.$commonJS.showToast(e.errMsg);
+ });
+ return ss
+ },
+
//获取相关关联课程商品
handleClickGetGoodsList(v) {
// console.log("data at line 313:", data);
@@ -1686,10 +1721,11 @@
this.curId = this.librayList[0].id;
this.curIndex = 0
console.log('首次加载');
- }
-
- this.chapterList = await this.getChapterList(this.catalogueId)
- // console.log('目录列表', this.librayList)
+ }
+ console.log('this.librayList[0]',this.librayList[0]);
+ this.clicklib(this.librayList[0], 0)
+ // this.chapterList = await this.getChapterList(this.catalogueId)
+ console.log('目录列表', this.librayList)
// console.log('外面得到的方法列表', this.chapterList);
if (
res.data.shopProductList &&
@@ -1782,13 +1818,24 @@
return datas;
},
async clicklib(item, index) {
- if (item.id == this.curId) {
- return;
- }
+ console.log('hhhhhhhhhhhhhhhhhhh++++++++', item);
+
+ // if (item.id == this.curId) {
+ // return;
+ // }
this.catalogueId = item.id
this.curIndex = index;
this.curId = item.id;
+
+ if(item.isBuy == 0 && this.userMsg.vip != 2 && this.userMsg.vip != 1 ){
+ console.log('hhhhhhhhhhhhhhhhhhh++++++++');
+ this.showNewPayBtn = await this.checkRenewPayment(item.id)
+ }else{
+ // this.showNewPayBtn = await this.checkRenewPayment(item.id)
+ console.log('hhhhhhhhhhhhhhhhhhh不用复读');
+ }
this.chapterList = await this.getChapterList(item.id);
+
},
toZhedie() {
this.fold = true;