|
|
|
|
@ -294,13 +294,13 @@ const confirmPayment = async () => {
|
|
|
|
|
title: "正在跳转支付宝...",
|
|
|
|
|
});
|
|
|
|
|
console.log("orderResult", orderResult);
|
|
|
|
|
// if (1 == 1) {
|
|
|
|
|
// uni.redirectTo({
|
|
|
|
|
// url: `/pagesA/payment-result/payment-result?order_no=${orderNum.order_no}`,
|
|
|
|
|
// });
|
|
|
|
|
// uni.hideLoading();
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// if (1 == 1) {
|
|
|
|
|
// uni.redirectTo({
|
|
|
|
|
// url: `/pagesA/payment-result/payment-result?order_no=${orderNum.order_no}`,
|
|
|
|
|
// });
|
|
|
|
|
// uni.hideLoading();
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
paymentResult = await alipayPay(orderResult);
|
|
|
|
|
} else if (selectedPayment.value === "wallet") {
|
|
|
|
|
const res = await showModalAsync({
|
|
|
|
|
@ -325,10 +325,15 @@ const confirmPayment = async () => {
|
|
|
|
|
// 4. 处理支付结果
|
|
|
|
|
if (paymentResult?.success) {
|
|
|
|
|
if (paymentResult.redirect) {
|
|
|
|
|
// H5跳转支付,跳转到支付结果页面查询状态
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url: `/pagesA/payment-result/payment-result?order_no=${orderNum.order_no}`,
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: "正在跳转支付页面...",
|
|
|
|
|
icon: "loading",
|
|
|
|
|
duration: 2000,
|
|
|
|
|
});
|
|
|
|
|
// H5跳转支付,跳转到支付结果页面查询状态
|
|
|
|
|
// uni.redirectTo({
|
|
|
|
|
// url: `/pagesA/payment-result/payment-result?order_no=${orderNum.order_no}`,
|
|
|
|
|
// });
|
|
|
|
|
} else {
|
|
|
|
|
// 支付成功,跳转到支付结果页面
|
|
|
|
|
// 延迟跳转回上一页或首页
|
|
|
|
|
|