Lufaneng 1 year ago
parent ae867dc7e5
commit b8ab52c562

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

Loading…
Cancel
Save