hookehuyr

fix: 修复支付参数失败时未重置支付标志的问题

在支付参数获取失败或不需要支付时,重置待支付订单ID和是否需要支付标志,确保状态一致性
<!--
* @Date: 2024-01-15 16:25:51
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2026-01-16 17:29:46
* @LastEditTime: 2026-01-16 17:38:55
* @FilePath: /xyxBooking-weapp/src/pages/submit/index.vue
* @Description: 预约人员信息
-->
......@@ -125,6 +125,7 @@ const goToVisitor = () => {
// 待支付订单ID
const pending_pay_id = ref(null);
// 待支付订单是否需要支付
const pending_need_pay = ref(null);
const submitBtn = async () => {
......@@ -184,12 +185,12 @@ const submitBtn = async () => {
})
} else {
pending_pay_id.value = null; // 支付参数获取失败,重置订单ID
pending_need_pay.value = null;
pending_need_pay.value = null; // 支付参数获取失败,重置是否需要支付标志
Taro.showToast({ title: payParams.msg || '获取支付信息失败', icon: 'none' });
}
} else {
pending_pay_id.value = null;
pending_need_pay.value = null;
pending_pay_id.value = null; // 不需要支付,重置订单ID
pending_need_pay.value = null; // 不需要支付,重置是否需要支付标志
go('/success', { pay_id });
}
}
......