添加复读订单功能
This commit is contained in:
@@ -229,9 +229,7 @@
|
||||
<text style="line-height: 50rpx;">课程有效期截止到:{{librayList[curIndex].endTime}} </text>
|
||||
<!-- 自己买的可以续费 -->
|
||||
<text class="xufeiBtn"
|
||||
@click="handleClickGetGoodsList(librayList[curIndex])">续费</text>
|
||||
<text class="xufeiBtn"
|
||||
@click="handleClickGetGoodsList(librayList[curIndex])" v-if="showNewPayBtn">复读</text>
|
||||
@click="handleClickGetGoodsList(librayList[curIndex])">续费</text>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
@@ -245,6 +243,10 @@
|
||||
<view class="tag-view flex_box">
|
||||
<u-button class="btn" type="warning" size="small"
|
||||
@click="handleClickGetGoodsList(librayList[curIndex])" text="购买课程"></u-button>
|
||||
<u-button class="btn" type="success" size="small"
|
||||
@click="goNewPay(librayList[curIndex])" text="复读" v-if="showNewPayBtn"></u-button>
|
||||
<!-- <text class="xufeiBtn"
|
||||
@click="goNewPay(librayList[curIndex])" >复读</text> -->
|
||||
<u-button size="small" v-if="isAndorid" class="btn" type="primary"
|
||||
@click="onPageJump('/pages/mine/vip/index')" text="开通VIP"></u-button>
|
||||
<!-- <uni-tag size="normal" style="margin-left: 20rpx;" text="" type="success" /> -->
|
||||
@@ -465,10 +467,10 @@
|
||||
|
||||
</view>
|
||||
|
||||
<common-select-goods ref="commonSelectGoods" :selectGoodsData="selectGoodsData" :goodsList="goodsList"
|
||||
<common-select-goods ref="commonSelectGoods" isFudu="isFudu" :selectGoodsData="selectGoodsData" :goodsList="goodsList"
|
||||
:buyOptions="buyOptions" :customButtonGroup1="customButtonGroup1" @selectGoods="handleClickSelectGoods"
|
||||
@onHandleClickBuy="
|
||||
$refs.commonSelectGoods.close();
|
||||
$refs.commonSelectGoods.close();
|
||||
protocolShow = true;
|
||||
"></common-select-goods>
|
||||
<u-popup :show="protocolShow" mode="center" round="6" v-if="protocolShow">
|
||||
@@ -625,7 +627,8 @@
|
||||
list: "sociology/course/getCourseDetail",
|
||||
goodsList: "sociology/product/getProductListForCourse",
|
||||
startStudyForMF: "sociology/course/startStudyForMF",
|
||||
newPayment:"common/courseRelearn/courseCatalogueCanRelearn", // 复读地址
|
||||
newPayment:"common/courseRelearn/courseCatalogueCanRelearn", // 检查复读地址
|
||||
newPaymentList:"common/courseRelearn/relearnShopProductList", // 获取复读列表
|
||||
},
|
||||
isAndorid: true,
|
||||
oprateOsName: '',
|
||||
@@ -642,6 +645,8 @@
|
||||
canJoinTestTime: false, //时间上是否可以参加自考考试
|
||||
courseCompletion: undefined, // 课程学习进度
|
||||
showNewPayBtn:false,
|
||||
newPaymentProList:[],
|
||||
isFudu:false, // 是否复读
|
||||
};
|
||||
},
|
||||
//第一次加载
|
||||
@@ -1112,6 +1117,7 @@
|
||||
typeId: 0,
|
||||
navTitle: this.course.title,
|
||||
title: this.course.title,
|
||||
isFudu: this.isFudu
|
||||
// sourceType: "curriculum",
|
||||
}); // 这里转换成 字符串
|
||||
uni.navigateTo({
|
||||
@@ -1123,9 +1129,41 @@
|
||||
this.pricespop = false;
|
||||
this.protocolShow = true;
|
||||
},
|
||||
// 查询课程复读列表
|
||||
async getNewPaymentList(id){
|
||||
uni.showLoading({
|
||||
title:'加载中'
|
||||
})
|
||||
await this.$http
|
||||
.request({
|
||||
url: this.urlList.newPaymentList,
|
||||
method: "POST",
|
||||
data: {
|
||||
catalogueId: id,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
console.log("复读列表", res);
|
||||
uni.hideLoading()
|
||||
if(res.code != 0){return this.$commonJS.showToast(res.errMsg);}
|
||||
// if (res.code == 0) {
|
||||
this.newPaymentProList = res.productList
|
||||
// }
|
||||
this.$forceUpdate();
|
||||
}).catch(e => {
|
||||
uni.hideLoading()
|
||||
console.log('e',e);
|
||||
this.newPaymentProList = []
|
||||
this.$commonJS.showToast(e.errMsg);
|
||||
});
|
||||
|
||||
},
|
||||
// 查询目录续费情况
|
||||
async checkRenewPayment(id){
|
||||
console.log('999999999999999999999999999');
|
||||
async checkRenewPayment(id){
|
||||
var ss = false
|
||||
await this.$http
|
||||
.request({
|
||||
@@ -1192,6 +1230,7 @@
|
||||
}
|
||||
},
|
||||
getCourseDescriptionData(v){
|
||||
this.isFudu = false
|
||||
this.$http
|
||||
.request({
|
||||
url: this.urlList.goodsList,
|
||||
@@ -1817,6 +1856,22 @@
|
||||
console.log("datas at line 1300:", datas);
|
||||
return datas;
|
||||
},
|
||||
// 选择复读选项
|
||||
async goNewPay(item){
|
||||
this.showNewPayBtn ? await this.getNewPaymentList(item.id) : ''
|
||||
if(this.newPaymentProList.length > 0){
|
||||
// this.getCourseDescriptionData(v);
|
||||
this.goodsList = this.newPaymentProList;
|
||||
this.selectGoodsData = this.goodsList[0];
|
||||
this.$refs.commonSelectGoods.open();
|
||||
this.isFudu = true
|
||||
this.show = true;
|
||||
}else{
|
||||
this.show = false
|
||||
this.isFudu = false
|
||||
this.$commonJS.showToast('暂无复读方案');
|
||||
}
|
||||
},
|
||||
async clicklib(item, index) {
|
||||
console.log('hhhhhhhhhhhhhhhhhhh++++++++', item);
|
||||
|
||||
@@ -1829,10 +1884,10 @@
|
||||
|
||||
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.showNewPayBtn = await this.checkRenewPayment(item.id)
|
||||
console.log('可以复读吗?', this.showNewPayBtn );
|
||||
}else{ // this.showNewPayBtn = await this.checkRenewPayment(item.id)
|
||||
console.log('不用复读');
|
||||
}
|
||||
this.chapterList = await this.getChapterList(item.id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user