Fix(订单):抽奖商品购买,微信支付成功应该跳转至订单详情

This commit is contained in:
lifizer
2026-05-25 12:24:46 +08:00
parent fe1cdf4dd5
commit dba726dc12
2 changed files with 29 additions and 47 deletions
+2 -2
View File
@@ -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 => {
+27 -45
View File
@@ -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() {