hookehuyr

fix

......@@ -17,6 +17,7 @@ declare module '@vue/runtime-core' {
VanDatePicker: typeof import('vant/es')['DatePicker']
VanIcon: typeof import('vant/es')['Icon']
VanList: typeof import('vant/es')['List']
VanLoading: typeof import('vant/es')['Loading']
VanPicker: typeof import('vant/es')['Picker']
VanPopup: typeof import('vant/es')['Popup']
VanSwipe: typeof import('vant/es')['Swipe']
......
<!--
* @Date: 2024-01-16 13:19:23
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-25 14:57:11
* @LastEditTime: 2024-01-25 16:48:03
* @FilePath: /xysBooking/src/views/bookingDetail.vue
* @Description: 预约记录详情
-->
......@@ -34,6 +34,9 @@
<div v-if="billInfo.status === CodeStatus.SUCCESS" class="cancel-wrapper">
<div @click="cancelBooking" class="cancel-btn ">取消预约</div>
</div>
<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);">
<van-loading size="24px" color="#fff" vertical>取消中...</van-loading>
</div>
</div>
</template>
......@@ -57,6 +60,7 @@ const go = useGo();
const pay_id = $route.query.pay_id;
const qrCodeStatus = ref('');
const loading = ref(false);
const cancelBooking = (item) => {
showConfirmDialog({
......@@ -66,9 +70,11 @@ const cancelBooking = (item) => {
width: '80vw'
})
.then(async () => {
loading.value = true;
// on confirm
const { code, data } = await icbcRefundAPI({ pay_id });
if (code) {
loading.value = false;
showSuccessToast('取消成功');
$router.go(-1);
}
......