添加复读功能
This commit is contained in:
@@ -230,6 +230,8 @@
|
|||||||
<!-- 自己买的可以续费 -->
|
<!-- 自己买的可以续费 -->
|
||||||
<text class="xufeiBtn"
|
<text class="xufeiBtn"
|
||||||
@click="handleClickGetGoodsList(librayList[curIndex])">续费</text>
|
@click="handleClickGetGoodsList(librayList[curIndex])">续费</text>
|
||||||
|
<text class="xufeiBtn"
|
||||||
|
@click="handleClickGetGoodsList(librayList[curIndex])" v-if="showNewPayBtn">复读</text>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -623,6 +625,7 @@
|
|||||||
list: "sociology/course/getCourseDetail",
|
list: "sociology/course/getCourseDetail",
|
||||||
goodsList: "sociology/product/getProductListForCourse",
|
goodsList: "sociology/product/getProductListForCourse",
|
||||||
startStudyForMF: "sociology/course/startStudyForMF",
|
startStudyForMF: "sociology/course/startStudyForMF",
|
||||||
|
newPayment:"common/courseRelearn/courseCatalogueCanRelearn", // 复读地址
|
||||||
},
|
},
|
||||||
isAndorid: true,
|
isAndorid: true,
|
||||||
oprateOsName: '',
|
oprateOsName: '',
|
||||||
@@ -638,6 +641,7 @@
|
|||||||
showNextTestDate: undefined,
|
showNextTestDate: undefined,
|
||||||
canJoinTestTime: false, //时间上是否可以参加自考考试
|
canJoinTestTime: false, //时间上是否可以参加自考考试
|
||||||
courseCompletion: undefined, // 课程学习进度
|
courseCompletion: undefined, // 课程学习进度
|
||||||
|
showNewPayBtn:false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//第一次加载
|
//第一次加载
|
||||||
@@ -1119,6 +1123,37 @@
|
|||||||
this.pricespop = false;
|
this.pricespop = false;
|
||||||
this.protocolShow = true;
|
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) {
|
handleClickGetGoodsList(v) {
|
||||||
// console.log("data at line 313:", data);
|
// console.log("data at line 313:", data);
|
||||||
@@ -1687,9 +1722,10 @@
|
|||||||
this.curIndex = 0
|
this.curIndex = 0
|
||||||
console.log('首次加载');
|
console.log('首次加载');
|
||||||
}
|
}
|
||||||
|
console.log('this.librayList[0]',this.librayList[0]);
|
||||||
this.chapterList = await this.getChapterList(this.catalogueId)
|
this.clicklib(this.librayList[0], 0)
|
||||||
// console.log('目录列表', this.librayList)
|
// this.chapterList = await this.getChapterList(this.catalogueId)
|
||||||
|
console.log('目录列表', this.librayList)
|
||||||
// console.log('外面得到的方法列表', this.chapterList);
|
// console.log('外面得到的方法列表', this.chapterList);
|
||||||
if (
|
if (
|
||||||
res.data.shopProductList &&
|
res.data.shopProductList &&
|
||||||
@@ -1782,13 +1818,24 @@
|
|||||||
return datas;
|
return datas;
|
||||||
},
|
},
|
||||||
async clicklib(item, index) {
|
async clicklib(item, index) {
|
||||||
if (item.id == this.curId) {
|
console.log('hhhhhhhhhhhhhhhhhhh++++++++', item);
|
||||||
return;
|
|
||||||
}
|
// if (item.id == this.curId) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
this.catalogueId = item.id
|
this.catalogueId = item.id
|
||||||
this.curIndex = index;
|
this.curIndex = index;
|
||||||
this.curId = item.id;
|
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);
|
this.chapterList = await this.getChapterList(item.id);
|
||||||
|
|
||||||
},
|
},
|
||||||
toZhedie() {
|
toZhedie() {
|
||||||
this.fold = true;
|
this.fold = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user