From bd98f12d4db803a599d0147b9494c54219dffb45 Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Mon, 9 Dec 2024 10:44:30 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=91=E5=B8=81=E8=A7=A3=E9=94=81=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- me/detail/detail.nvue | 15 ++++++++++----- me/detail/detail.vue | 19 +++++++++++++------ me/detail/detailIOS.nvue | 11 ++++++----- 3 files changed, 29 insertions(+), 16 deletions(-) diff --git a/me/detail/detail.nvue b/me/detail/detail.nvue index 2b8ddff..36ee721 100644 --- a/me/detail/detail.nvue +++ b/me/detail/detail.nvue @@ -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() //显示充值弹窗 } }); }, diff --git a/me/detail/detail.vue b/me/detail/detail.vue index 07cdeb7..1002f71 100644 --- a/me/detail/detail.vue +++ b/me/detail/detail.vue @@ -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 //显示充值弹窗 } }); }, diff --git a/me/detail/detailIOS.nvue b/me/detail/detailIOS.nvue index 515a6eb..7b90a2d 100644 --- a/me/detail/detailIOS.nvue +++ b/me/detail/detailIOS.nvue @@ -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 } }); },