From 34711330bd308ad25d3f6a6c6ae8c12ab2adeaba Mon Sep 17 00:00:00 2001 From: duanshuwen Date: Thu, 23 Jul 2026 21:10:34 +0800 Subject: [PATCH] feat(utils, payment): add execution lock utils and prevent duplicate payment requests Add two new throttle utility methods: createAsyncThrottle and createExecutionLock for safe async operation locking. Update the existing throttle method's comment to clarify traditional timestamp usage. Replace DebounceUtils usage with ThrottleUtils.createExecutionLock in order footer and booking page payment handlers to prevent duplicate payments. Rewrite uni.requestPayment calls to use Promise wrapping for proper async handling, and add try/catch/finally blocks to ensure loading state is always cleaned up correctly. Fix template formatting and trailing commas across modified files. --- src/pages-booking/index.vue | 199 ++++++++---------- .../order/components/FooterSection/index.vue | 88 ++++---- src/utils/index.js | 81 ++++++- 3 files changed, 206 insertions(+), 162 deletions(-) diff --git a/src/pages-booking/index.vue b/src/pages-booking/index.vue index 014efc5..6c40cb7 100644 --- a/src/pages-booking/index.vue +++ b/src/pages-booking/index.vue @@ -1,95 +1,56 @@