hookehuyr

fix

...@@ -17,6 +17,7 @@ declare module '@vue/runtime-core' { ...@@ -17,6 +17,7 @@ declare module '@vue/runtime-core' {
17 VanDatePicker: typeof import('vant/es')['DatePicker'] 17 VanDatePicker: typeof import('vant/es')['DatePicker']
18 VanIcon: typeof import('vant/es')['Icon'] 18 VanIcon: typeof import('vant/es')['Icon']
19 VanList: typeof import('vant/es')['List'] 19 VanList: typeof import('vant/es')['List']
20 + VanLoading: typeof import('vant/es')['Loading']
20 VanPicker: typeof import('vant/es')['Picker'] 21 VanPicker: typeof import('vant/es')['Picker']
21 VanPopup: typeof import('vant/es')['Popup'] 22 VanPopup: typeof import('vant/es')['Popup']
22 VanSwipe: typeof import('vant/es')['Swipe'] 23 VanSwipe: typeof import('vant/es')['Swipe']
......
1 <!-- 1 <!--
2 * @Date: 2024-01-16 13:19:23 2 * @Date: 2024-01-16 13:19:23
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-01-25 14:57:11 4 + * @LastEditTime: 2024-01-25 16:48:03
5 * @FilePath: /xysBooking/src/views/bookingDetail.vue 5 * @FilePath: /xysBooking/src/views/bookingDetail.vue
6 * @Description: 预约记录详情 6 * @Description: 预约记录详情
7 --> 7 -->
...@@ -34,6 +34,9 @@ ...@@ -34,6 +34,9 @@
34 <div v-if="billInfo.status === CodeStatus.SUCCESS" class="cancel-wrapper"> 34 <div v-if="billInfo.status === CodeStatus.SUCCESS" class="cancel-wrapper">
35 <div @click="cancelBooking" class="cancel-btn ">取消预约</div> 35 <div @click="cancelBooking" class="cancel-btn ">取消预约</div>
36 </div> 36 </div>
37 + <div v-if="loading" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; height: 100vh; width: 100vw; display: flex; justify-content: center; align-items: center;background: rgba(0, 0, 0, 0.5);">
38 + <van-loading size="24px" color="#fff" vertical>取消中...</van-loading>
39 + </div>
37 </div> 40 </div>
38 </template> 41 </template>
39 42
...@@ -57,6 +60,7 @@ const go = useGo(); ...@@ -57,6 +60,7 @@ const go = useGo();
57 60
58 const pay_id = $route.query.pay_id; 61 const pay_id = $route.query.pay_id;
59 const qrCodeStatus = ref(''); 62 const qrCodeStatus = ref('');
63 +const loading = ref(false);
60 64
61 const cancelBooking = (item) => { 65 const cancelBooking = (item) => {
62 showConfirmDialog({ 66 showConfirmDialog({
...@@ -66,9 +70,11 @@ const cancelBooking = (item) => { ...@@ -66,9 +70,11 @@ const cancelBooking = (item) => {
66 width: '80vw' 70 width: '80vw'
67 }) 71 })
68 .then(async () => { 72 .then(async () => {
73 + loading.value = true;
69 // on confirm 74 // on confirm
70 const { code, data } = await icbcRefundAPI({ pay_id }); 75 const { code, data } = await icbcRefundAPI({ pay_id });
71 if (code) { 76 if (code) {
77 + loading.value = false;
72 showSuccessToast('取消成功'); 78 showSuccessToast('取消成功');
73 $router.go(-1); 79 $router.go(-1);
74 } 80 }
......