From dba726dc125046efce2aa92ca9e2783099060d36 Mon Sep 17 00:00:00 2001 From: lifizer <913626195@qq.com> Date: Mon, 25 May 2026 12:24:46 +0800 Subject: [PATCH] =?UTF-8?q?Fix(=E8=AE=A2=E5=8D=95):=E6=8A=BD=E5=A5=96?= =?UTF-8?q?=E5=95=86=E5=93=81=E8=B4=AD=E4=B9=B0=EF=BC=8C=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=88=90=E5=8A=9F=E5=BA=94=E8=AF=A5=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E8=87=B3=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/wechat.js | 4 +- pages/order/OrderSubmission/index.vue | 72 ++++++++++----------------- 2 files changed, 29 insertions(+), 47 deletions(-) diff --git a/libs/wechat.js b/libs/wechat.js index b95b507..de04fa9 100644 --- a/libs/wechat.js +++ b/libs/wechat.js @@ -1,4 +1,4 @@ -import { subscribeMessage } from '@/libs/order' +// import { subscribeMessage } from '@/libs/order' import { getProvider } from '@/utils' import WechatJSSDK from 'wechat-jssdk/dist/client.umd' import { getWechatConfig, wechatAuth } from '@/api/public' @@ -65,7 +65,7 @@ export const weappPay = option => { resolve(success) }, 3000) // #ifdef MP-WEIXIN - subscribeMessage() + // subscribeMessage() // #endif }, fail: error => { diff --git a/pages/order/OrderSubmission/index.vue b/pages/order/OrderSubmission/index.vue index e211e46..c45c512 100644 --- a/pages/order/OrderSubmission/index.vue +++ b/pages/order/OrderSubmission/index.vue @@ -743,21 +743,7 @@ export default { icon: "none", duration: 2000 }) - this.afterPaySuccess(orderId, (drawTicketResult) => { - if (this.orderGroupInfo.cartInfo && this.orderGroupInfo.cartInfo.length === 1) { - this.$yrouter.replace({ - path: "/pagesOrder/order/OrderDetails/index", - query: this.buildOrderDetailQuery(orderId, drawTicketResult) - }) - } else { - this.$yrouter.replace({ - path: "/pages/order/MyOrder/index", - query: { - type: 2 - } - }) - } - }) + this.paySuccessToMyOrderOrDetail(orderId) break; case "WECHAT_H5_PAY": // H5支付 @@ -771,41 +757,17 @@ export default { case "WECHAT_PAY": // 小程序支付 weappPay(data.result.jsConfig).then(() => { - this.afterPaySuccess(orderId, () => { - this.$yrouter.replace({ - path: "/pages/order/MyOrder/index", - query: { - type: 1 - } - }) - }) + this.paySuccessToMyOrderOrDetail(orderId) }).catch(() => { - this.$yrouter.replace({ - path: "/pages/order/MyOrder/index", - query: { - type: 1 - } - }) + this.paySuccessToMyOrderOrDetail(orderId) }) break; case "WECHAT_APP_PAY": // APP支付 weappPay(data.result.jsConfig).then(() => { - this.afterPaySuccess(orderId, () => { - this.$yrouter.replace({ - path: "/pages/order/MyOrder/index", - query: { - type: 1 - } - }) - }) + this.paySuccessToMyOrderOrDetail(orderId) }).catch(() => { - this.$yrouter.replace({ - path: "/pages/order/MyOrder/index", - query: { - type: 1 - } - }) + this.paySuccessToMyOrderOrDetail(orderId) }) break; } @@ -820,9 +782,29 @@ export default { duration: 2000 }) }).finally(function () { + if (that.$refs.payPwdPop) { + that.$refs.payPwdPop.clear() + that.$refs.payPwdPop.close() + } that.isShowPayPwdPop = false - that.$refs.payPwdPop.clear() - that.$refs.payPwdPop.close() + }) + }, + paySuccessToMyOrderOrDetail(orderId) { + this.afterPaySuccess(orderId, (drawTicketResult) => { + if (this.orderGroupInfo.cartInfo && this.orderGroupInfo.cartInfo.length === 1) { + this.$yrouter.replace({ + path: "/pagesOrder/order/OrderDetails/index", + query: this.buildOrderDetailQuery(orderId, drawTicketResult) + }) + } else { + this.$yrouter.replace({ + path: "/pages/order/MyOrder/index", + query: { + type: 2, + query: this.buildOrderDetailQuery(orderId, drawTicketResult) + } + }) + } }) }, close() {