解锁视频增加加载
This commit is contained in:
@@ -1041,6 +1041,7 @@
|
||||
},
|
||||
popupPyaClose() {
|
||||
this.isOrder = true
|
||||
console.log(this.isOrder)
|
||||
},
|
||||
/**
|
||||
* @param {Object} type 类型
|
||||
@@ -1048,9 +1049,13 @@
|
||||
* 2:购买单集视频
|
||||
*/
|
||||
payVideo(type, num) {
|
||||
console.log(this.isOrder)
|
||||
if(!this.isOrder){
|
||||
return;
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
this.isOrder = false
|
||||
if (uni.getStorageSync('token')) {
|
||||
this.submitPay(type, num)
|
||||
@@ -1091,16 +1096,18 @@
|
||||
if (type == 1) { //金币
|
||||
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
|
||||
} else if (type == 2) { //支付宝
|
||||
uni.hideLoading()
|
||||
this.closePay() //关闭购买选择弹窗
|
||||
this.payPrice = res.data.orders.payMoney //需要支付的价格
|
||||
this.openPopusPay() //显示充值弹窗
|
||||
}
|
||||
|
||||
}
|
||||
console.log(this.isOrder)
|
||||
|
||||
// this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
|
||||
} else {
|
||||
|
||||
this.isOrder = true
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
@@ -1124,7 +1131,6 @@
|
||||
this.closePopusPay()
|
||||
this.closePay()
|
||||
that.showPay = false
|
||||
this.isOrder = true
|
||||
that.showMoney = false
|
||||
that.noBuyVideoIndex = null
|
||||
setTimeout(() => {
|
||||
@@ -1143,6 +1149,7 @@
|
||||
// this.payPrice = payMoney //需要支付的价格
|
||||
// this.openPopusPay() //显示充值弹窗
|
||||
}
|
||||
this.isOrder = true
|
||||
});
|
||||
},
|
||||
//打开购买弹窗
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
|
||||
<!-- 购买视频 -->
|
||||
<u-popup :closeable="true" :custom-style="customStyle" :safe-area-inset-bottom="true" close-icon="close"
|
||||
close-icon-size="30" close-icon-color="#333333" :mask-custom-style="maskCustomStyle" v-model="showPay"
|
||||
close-icon-size="30" @close="popupPyaClose" close-icon-color="#333333" :mask-custom-style="maskCustomStyle" v-model="showPay"
|
||||
border-radius="24" mode="bottom">
|
||||
<view class="list" :style="listStyle">
|
||||
<view class="list-title flex align-center">
|
||||
@@ -1317,6 +1317,10 @@
|
||||
closeMoney(data) {
|
||||
this.showMoney = data
|
||||
},
|
||||
popupPyaClose() {
|
||||
this.isOrder = true
|
||||
console.log(this.isOrder)
|
||||
},
|
||||
//使用金币购买
|
||||
submitPay(type, num) {
|
||||
let data = {
|
||||
@@ -1344,9 +1348,9 @@
|
||||
}
|
||||
|
||||
} else {
|
||||
this.isOrder = true
|
||||
if ( res.status && res.status == 1) {
|
||||
this.showPay = false //关闭购买选择弹窗
|
||||
this.isOrder = true
|
||||
this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId,
|
||||
true);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user