This commit is contained in:
张成
2025-12-10 00:14:09 +08:00
parent 85566b448e
commit e2a8ed4e32

View File

@@ -626,10 +626,6 @@ const OrderCheck = () => {
return; // 未登录或未绑定手机号,已跳转到登录页 return; // 未登录或未绑定手机号,已跳转到登录页
} }
setPaying(true); setPaying(true);
Taro.showLoading({
title: "支付中...",
mask: true,
});
let payment_params = {}; let payment_params = {};
try { try {
@@ -641,7 +637,6 @@ const OrderCheck = () => {
}); });
} }
await payOrder(payment_params); await payOrder(payment_params);
Taro.hideLoading();
Taro.showToast({ Taro.showToast({
title: "支付成功", title: "支付成功",
icon: "success", icon: "success",
@@ -655,7 +650,6 @@ const OrderCheck = () => {
// delta: 1, // delta: 1,
// }); // });
} catch (error) { } catch (error) {
Taro.hideLoading();
Taro.showToast({ Taro.showToast({
title: error.message, title: error.message,
icon: "none", icon: "none",
@@ -717,15 +711,16 @@ const OrderCheck = () => {
<Disclaimer /> <Disclaimer />
{(!id || {(!id ||
(order_status === OrderStatus.PENDING && (order_status === OrderStatus.PENDING &&
cancel_type === CancelType.NONE)) && cancel_type === CancelType.NONE)) && (
!paying && (
<Button <Button
className={styles.payButton} className={styles.payButton}
disabled={paying} disabled={paying}
onClick={handlePay} onClick={handlePay}
loading={paying}
> >
{order_status === OrderStatus.PENDING ? "继续" : "确认"} {paying
? "支付中..."
: `${order_status === OrderStatus.PENDING ? "继续" : "确认"}支付`}
</Button> </Button>
)} )}
</View> </View>