绑定支付宝,视频解锁生成订单增加限制

This commit is contained in:
GaoHao
2024-12-26 14:07:51 +08:00
parent 646379471f
commit 440811c3fa
6 changed files with 56 additions and 36 deletions

View File

@@ -406,7 +406,8 @@
getRedEnvelopeTips: '',
scale: 1,
// 防抖使用的变量
appearTimeout: null
appearTimeout: null,
isOrder: true
};
},
onUnload() {
@@ -1041,6 +1042,12 @@
* 2:购买单集视频
*/
payVideo(type, num) {
console.log(this.isOrder)
if(!this.isOrder){
return;
}
console.log(1)
this.isOrder = false
if (uni.getStorageSync('token')) {
this.submitPay(type, num)
} else {
@@ -1061,6 +1068,7 @@
}
httpsRequest.getT((num && num == 10) ? '/app/order/insertCourseOrders/limit10' :
'/app/order/insertCourseOrders', data).then(res => {
console.log(3)
if (res.code == 0) {
this.ordersId = res.data.orders.ordersId //记录订单id
this.payMoney = res.data.orders.payMoney //记录订单价格
@@ -1077,6 +1085,7 @@
} else {
if (res.status && res.status == 1) {
this.showPay = false //关闭购买选择弹窗
this.isOrder = true
this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId,
true);
return;
@@ -1103,6 +1112,7 @@
this.closePopusPay()
this.closePay()
that.showPay = false
this.isOrder = true
that.showMoney = false
that.noBuyVideoIndex = null
setTimeout(() => {
@@ -1291,6 +1301,7 @@
token: uni.getStorageSync('token') ? uni.getStorageSync('token') : ''
};
httpsRequest.getT('/app/course/selectCourseDetailsById', data).then(res => {
if (res.code == 0) {
console.log(res)
if (res.data.listsDetail) {