Files
device-voice-h5/openspec/changes/add-payment-submit-guard/proposal.md
sexygoat 3f997063f4
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 1m37s
fix: 优化体验
2026-05-09 16:14:06 +08:00

27 lines
1.6 KiB
Markdown

## Why
The wallet recharge confirmation, package payment confirmation, order list immediate payment, and wallet recharge order immediate payment flows can be triggered repeatedly when users tap quickly or when the page is slow to respond. This can cause duplicate order creation, duplicate payment preparation, repeated payment invocation, and inconsistent UI state.
## What Changes
- Add a front-end submit guard for the wallet recharge confirmation flow in `pages/my-wallet/my-wallet.vue`
- Add a front-end submit guard for the package payment confirmation flow in `pages/package-order/package-order.vue`
- Add a front-end submit guard for the order list immediate payment flow in `pages/order-list/order-list.vue`
- Add a front-end submit guard for the wallet recharge order immediate payment flow in `pages/my-wallet/my-wallet.vue`
- Standardize button behavior during submission so repeated taps are ignored until the current flow ends
- Require submit state recovery for success, failure, cancel, validation failure, list refresh, and modal re-entry paths
## Capabilities
### New Capabilities
- `payment-submit-guard`: Prevent duplicate submission in recharge and payment entry points across wallet, package order, and order list flows
### Modified Capabilities
## Impact
- Affected code: `pages/my-wallet/my-wallet.vue`, `pages/package-order/package-order.vue`, `pages/order-list/order-list.vue`
- Affected UI flows: wallet recharge modal, wallet recharge order list immediate payment, package payment method modal, order list immediate payment
- No backend API changes
- No payment business rule changes