金币解锁修改
This commit is contained in:
@@ -947,8 +947,6 @@
|
|||||||
this.payMoney = res.data.orders.payMoney //记录订单价格
|
this.payMoney = res.data.orders.payMoney //记录订单价格
|
||||||
|
|
||||||
if (type == 1) { //金币
|
if (type == 1) { //金币
|
||||||
this.showPay = false
|
|
||||||
this.showMoney = false
|
|
||||||
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){ //支付宝
|
||||||
this.closePay() //关闭购买选择弹窗
|
this.closePay() //关闭购买选择弹窗
|
||||||
@@ -967,6 +965,7 @@
|
|||||||
},
|
},
|
||||||
payOrder(orderId, payMoney) {
|
payOrder(orderId, payMoney) {
|
||||||
let that = this
|
let that = this
|
||||||
|
console.log("orderId=="+orderId)
|
||||||
httpsRequest.postT("/app/order/payOrders", {
|
httpsRequest.postT("/app/order/payOrders", {
|
||||||
orderId: orderId,
|
orderId: orderId,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@@ -987,9 +986,15 @@
|
|||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
} else { //支付失败(余额不足)
|
} else { //支付失败(余额不足)
|
||||||
that.closePay() //关闭购买选择弹窗
|
uni.showToast({
|
||||||
this.payPrice = payMoney //需要支付的价格
|
title: res.msg,
|
||||||
this.openPopusPay() //显示充值弹窗
|
icon: 'none'
|
||||||
|
})
|
||||||
|
that.showPay = true
|
||||||
|
that.showMoney = false
|
||||||
|
// that.closePay() //关闭购买选择弹窗
|
||||||
|
// this.payPrice = payMoney //需要支付的价格
|
||||||
|
// this.openPopusPay() //显示充值弹窗
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1223,9 +1223,9 @@
|
|||||||
this.payMoney = res.data.orders.payMoney //记录订单价格
|
this.payMoney = res.data.orders.payMoney //记录订单价格
|
||||||
console.log(type)
|
console.log(type)
|
||||||
if (type == 1) { //金币
|
if (type == 1) { //金币
|
||||||
this.showPay = false
|
// this.showPay = false
|
||||||
this.showMoney = false
|
// this.showMoney = false
|
||||||
this.payOrder(this.courseId, this.videoList[this.current].courseDetailsId);
|
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney);
|
||||||
} else if(type == 2){ //支付宝
|
} else if(type == 2){ //支付宝
|
||||||
this.showPay = false //关闭购买选择弹窗
|
this.showPay = false //关闭购买选择弹窗
|
||||||
this.payPrice = res.data.orders.payMoney //需要支付的价格
|
this.payPrice = res.data.orders.payMoney //需要支付的价格
|
||||||
@@ -1245,6 +1245,7 @@
|
|||||||
that.$Request.postT("/app/order/payOrders", {
|
that.$Request.postT("/app/order/payOrders", {
|
||||||
orderId: orderId,
|
orderId: orderId,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
that.showPay = true
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -1260,9 +1261,15 @@
|
|||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
} else { //支付失败(余额不足)
|
} else { //支付失败(余额不足)
|
||||||
that.showPay = false //关闭购买选择弹窗
|
uni.showToast({
|
||||||
this.payPrice = payMoney //需要支付的价格
|
title: res.msg,
|
||||||
this.showMoney = true //显示充值弹窗
|
icon: 'none'
|
||||||
|
})
|
||||||
|
that.showPay = true
|
||||||
|
that.showMoney = false
|
||||||
|
// that.showPay = false //关闭购买选择弹窗
|
||||||
|
// this.payPrice = payMoney //需要支付的价格
|
||||||
|
// this.showMoney = true //显示充值弹窗
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -936,8 +936,6 @@
|
|||||||
this.payMoney = res.data.orders.payMoney //记录订单价格
|
this.payMoney = res.data.orders.payMoney //记录订单价格
|
||||||
|
|
||||||
if (type == 1) { //金币
|
if (type == 1) { //金币
|
||||||
this.showPay = false
|
|
||||||
this.showMoney = false
|
|
||||||
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){ //支付宝
|
||||||
this.closePay() //关闭购买选择弹窗
|
this.closePay() //关闭购买选择弹窗
|
||||||
@@ -978,9 +976,12 @@
|
|||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
} else { //支付失败(余额不足)
|
} else { //支付失败(余额不足)
|
||||||
that.closePay() //关闭购买选择弹窗
|
uni.showToast({
|
||||||
this.payPrice = payMoney //需要支付的价格
|
title: res.msg,
|
||||||
this.openPopusPay() //显示充值弹窗
|
icon: 'none'
|
||||||
|
})
|
||||||
|
that.showPay = true
|
||||||
|
that.showMoney = false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user