fix: 修复支付参数失败时未重置支付标志的问题
在支付参数获取失败或不需要支付时,重置待支付订单ID和是否需要支付标志,确保状态一致性
Showing
1 changed file
with
5 additions
and
4 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-01-15 16:25:51 | 2 | * @Date: 2024-01-15 16:25:51 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2026-01-16 17:29:46 | 4 | + * @LastEditTime: 2026-01-16 17:38:55 |
| 5 | * @FilePath: /xyxBooking-weapp/src/pages/submit/index.vue | 5 | * @FilePath: /xyxBooking-weapp/src/pages/submit/index.vue |
| 6 | * @Description: 预约人员信息 | 6 | * @Description: 预约人员信息 |
| 7 | --> | 7 | --> |
| ... | @@ -125,6 +125,7 @@ const goToVisitor = () => { | ... | @@ -125,6 +125,7 @@ const goToVisitor = () => { |
| 125 | 125 | ||
| 126 | // 待支付订单ID | 126 | // 待支付订单ID |
| 127 | const pending_pay_id = ref(null); | 127 | const pending_pay_id = ref(null); |
| 128 | +// 待支付订单是否需要支付 | ||
| 128 | const pending_need_pay = ref(null); | 129 | const pending_need_pay = ref(null); |
| 129 | 130 | ||
| 130 | const submitBtn = async () => { | 131 | const submitBtn = async () => { |
| ... | @@ -184,12 +185,12 @@ const submitBtn = async () => { | ... | @@ -184,12 +185,12 @@ const submitBtn = async () => { |
| 184 | }) | 185 | }) |
| 185 | } else { | 186 | } else { |
| 186 | pending_pay_id.value = null; // 支付参数获取失败,重置订单ID | 187 | pending_pay_id.value = null; // 支付参数获取失败,重置订单ID |
| 187 | - pending_need_pay.value = null; | 188 | + pending_need_pay.value = null; // 支付参数获取失败,重置是否需要支付标志 |
| 188 | Taro.showToast({ title: payParams.msg || '获取支付信息失败', icon: 'none' }); | 189 | Taro.showToast({ title: payParams.msg || '获取支付信息失败', icon: 'none' }); |
| 189 | } | 190 | } |
| 190 | } else { | 191 | } else { |
| 191 | - pending_pay_id.value = null; | 192 | + pending_pay_id.value = null; // 不需要支付,重置订单ID |
| 192 | - pending_need_pay.value = null; | 193 | + pending_need_pay.value = null; // 不需要支付,重置是否需要支付标志 |
| 193 | go('/success', { pay_id }); | 194 | go('/success', { pay_id }); |
| 194 | } | 195 | } |
| 195 | } | 196 | } | ... | ... |
-
Please register or login to post a comment