fix(custom): 修复积分支付成功不跳转
This commit is contained in:
@@ -111,9 +111,9 @@ const goPay = async (type: number) => {
|
||||
OrderType: prop.OrderType,
|
||||
PayType: type,
|
||||
});
|
||||
if (data.data) {
|
||||
// 1微信支付 2积分支付
|
||||
if (type === 1) {
|
||||
// 1微信支付 2积分支付
|
||||
if (type === 1) {
|
||||
if (data.data) {
|
||||
Taro.requestPayment({
|
||||
timeStamp: data.data.timeStamp,
|
||||
nonceStr: data.data.nonceStr,
|
||||
@@ -139,25 +139,25 @@ const goPay = async (type: number) => {
|
||||
});
|
||||
} else {
|
||||
Taro.showToast({
|
||||
title: "支付成功",
|
||||
icon: "success",
|
||||
duration: 2000,
|
||||
title: "未知异常",
|
||||
icon: "none",
|
||||
});
|
||||
emit("successPay", false);
|
||||
emit("closePay", false);
|
||||
}
|
||||
} else {
|
||||
Taro.showToast({
|
||||
title: "未知异常",
|
||||
icon: "none",
|
||||
title: "支付成功",
|
||||
icon: "success",
|
||||
duration: 2000,
|
||||
});
|
||||
emit("closePay", false);
|
||||
emit("successPay", false);
|
||||
}
|
||||
} catch (e) {
|
||||
Taro.showToast({
|
||||
title: e.msg,
|
||||
icon: "none",
|
||||
});
|
||||
// emit("closePay", false);
|
||||
emit("closePay", false);
|
||||
throw e;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user