金币解锁修改

This commit is contained in:
GaoHao
2024-12-09 10:44:30 +08:00
parent d63cdea1ec
commit bd98f12d4d
3 changed files with 29 additions and 16 deletions

View File

@@ -947,8 +947,6 @@
this.payMoney = res.data.orders.payMoney //记录订单价格
if (type == 1) { //金币
this.showPay = false
this.showMoney = false
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
} else if(type == 2){ //支付宝
this.closePay() //关闭购买选择弹窗
@@ -967,6 +965,7 @@
},
payOrder(orderId, payMoney) {
let that = this
console.log("orderId=="+orderId)
httpsRequest.postT("/app/order/payOrders", {
orderId: orderId,
}).then(res => {
@@ -987,9 +986,15 @@
}, 1000)
} else { //支付失败(余额不足)
that.closePay() //关闭购买选择弹窗
this.payPrice = payMoney //需要支付的价格
this.openPopusPay() //显示充值弹窗
uni.showToast({
title: res.msg,
icon: 'none'
})
that.showPay = true
that.showMoney = false
// that.closePay() //关闭购买选择弹窗
// this.payPrice = payMoney //需要支付的价格
// this.openPopusPay() //显示充值弹窗
}
});
},

View File

@@ -1223,9 +1223,9 @@
this.payMoney = res.data.orders.payMoney //记录订单价格
console.log(type)
if (type == 1) { //金币
this.showPay = false
this.showMoney = false
this.payOrder(this.courseId, this.videoList[this.current].courseDetailsId);
// this.showPay = false
// this.showMoney = false
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney);
} else if(type == 2){ //支付宝
this.showPay = false //关闭购买选择弹窗
this.payPrice = res.data.orders.payMoney //需要支付的价格
@@ -1245,6 +1245,7 @@
that.$Request.postT("/app/order/payOrders", {
orderId: orderId,
}).then(res => {
that.showPay = true
if (res.code == 0) {
uni.hideLoading()
uni.showToast({
@@ -1260,9 +1261,15 @@
}, 1000)
} else { //支付失败(余额不足)
that.showPay = false //关闭购买选择弹窗
this.payPrice = payMoney //需要支付的价格
this.showMoney = true //显示充值弹窗
uni.showToast({
title: res.msg,
icon: 'none'
})
that.showPay = true
that.showMoney = false
// that.showPay = false //关闭购买选择弹窗
// this.payPrice = payMoney //需要支付的价格
// this.showMoney = true //显示充值弹窗
}
});
},

View File

@@ -936,8 +936,6 @@
this.payMoney = res.data.orders.payMoney //记录订单价格
if (type == 1) { //金币
this.showPay = false
this.showMoney = false
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
} else if(type == 2){ //支付宝
this.closePay() //关闭购买选择弹窗
@@ -978,9 +976,12 @@
}, 1000)
} else { //支付失败(余额不足)
that.closePay() //关闭购买选择弹窗
this.payPrice = payMoney //需要支付的价格
this.openPopusPay() //显示充值弹窗
uni.showToast({
title: res.msg,
icon: 'none'
})
that.showPay = true
that.showMoney = false
}
});
},