修复修改支付方式时为跳转到详情页面的问题
This commit is contained in:
@ -27,11 +27,8 @@ export const weappPay = (option) => {
|
||||
// 调用登录接口
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay',
|
||||
// timeStamp: orderInfo.timeStamp,
|
||||
// nonceStr: orderInfo.noncestr,
|
||||
// package: orderInfo.prepayid,
|
||||
// signType: "MD5",
|
||||
// paySign: orderInfo.sign,
|
||||
...option,
|
||||
timestamp: orderInfo.timestamp,
|
||||
orderInfo,
|
||||
success: (success) => {
|
||||
console.log(success)
|
||||
|
@ -508,6 +508,18 @@
|
||||
switch (data.status) {
|
||||
case "ORDER_EXIST":
|
||||
case "EXTEND_ORDER":
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
this.$yrouter.replace({
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
query: {
|
||||
id: data.result.orderId
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "PAY_DEFICIENCY":
|
||||
case "PAY_ERROR":
|
||||
uni.showToast({
|
||||
@ -549,24 +561,24 @@
|
||||
break;
|
||||
case "WECHAT_PAY":
|
||||
// 小程序支付
|
||||
weappPay(data.result.jsConfig).then(res => {
|
||||
weappPay(data.result.jsConfig).finally(()=>{
|
||||
this.$yrouter.replace({
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
query: {
|
||||
id: data.result.orderId
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
case "WECHAT_APP_PAY":
|
||||
// APP支付
|
||||
weappPay(data.result.jsConfig).then(res => {
|
||||
weappPay(data.result.jsConfig).finally(()=>{
|
||||
this.$yrouter.replace({
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
query: {
|
||||
id: data.result.orderId
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
// 下面为原先微信支付方式,
|
||||
// pay(data.result.jsConfig).finally(() => {
|
||||
|
Reference in New Issue
Block a user