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