Fix(订单):抽奖商品购买,微信支付成功应该跳转至订单详情
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
import { subscribeMessage } from '@/libs/order'
|
// import { subscribeMessage } from '@/libs/order'
|
||||||
import { getProvider } from '@/utils'
|
import { getProvider } from '@/utils'
|
||||||
import WechatJSSDK from 'wechat-jssdk/dist/client.umd'
|
import WechatJSSDK from 'wechat-jssdk/dist/client.umd'
|
||||||
import { getWechatConfig, wechatAuth } from '@/api/public'
|
import { getWechatConfig, wechatAuth } from '@/api/public'
|
||||||
@@ -65,7 +65,7 @@ export const weappPay = option => {
|
|||||||
resolve(success)
|
resolve(success)
|
||||||
}, 3000)
|
}, 3000)
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
subscribeMessage()
|
// subscribeMessage()
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
fail: error => {
|
fail: error => {
|
||||||
|
|||||||
@@ -743,21 +743,7 @@ export default {
|
|||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
this.afterPaySuccess(orderId, (drawTicketResult) => {
|
this.paySuccessToMyOrderOrDetail(orderId)
|
||||||
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
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
break;
|
break;
|
||||||
case "WECHAT_H5_PAY":
|
case "WECHAT_H5_PAY":
|
||||||
// H5支付
|
// H5支付
|
||||||
@@ -771,41 +757,17 @@ export default {
|
|||||||
case "WECHAT_PAY":
|
case "WECHAT_PAY":
|
||||||
// 小程序支付
|
// 小程序支付
|
||||||
weappPay(data.result.jsConfig).then(() => {
|
weappPay(data.result.jsConfig).then(() => {
|
||||||
this.afterPaySuccess(orderId, () => {
|
this.paySuccessToMyOrderOrDetail(orderId)
|
||||||
this.$yrouter.replace({
|
|
||||||
path: "/pages/order/MyOrder/index",
|
|
||||||
query: {
|
|
||||||
type: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$yrouter.replace({
|
this.paySuccessToMyOrderOrDetail(orderId)
|
||||||
path: "/pages/order/MyOrder/index",
|
|
||||||
query: {
|
|
||||||
type: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
case "WECHAT_APP_PAY":
|
case "WECHAT_APP_PAY":
|
||||||
// APP支付
|
// APP支付
|
||||||
weappPay(data.result.jsConfig).then(() => {
|
weappPay(data.result.jsConfig).then(() => {
|
||||||
this.afterPaySuccess(orderId, () => {
|
this.paySuccessToMyOrderOrDetail(orderId)
|
||||||
this.$yrouter.replace({
|
|
||||||
path: "/pages/order/MyOrder/index",
|
|
||||||
query: {
|
|
||||||
type: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$yrouter.replace({
|
this.paySuccessToMyOrderOrDetail(orderId)
|
||||||
path: "/pages/order/MyOrder/index",
|
|
||||||
query: {
|
|
||||||
type: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -820,9 +782,29 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
}).finally(function () {
|
}).finally(function () {
|
||||||
|
if (that.$refs.payPwdPop) {
|
||||||
|
that.$refs.payPwdPop.clear()
|
||||||
|
that.$refs.payPwdPop.close()
|
||||||
|
}
|
||||||
that.isShowPayPwdPop = false
|
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() {
|
close() {
|
||||||
|
|||||||
Reference in New Issue
Block a user