From 37ea4ee284df2e27d09fe24f9fbab155cd855cc6 Mon Sep 17 00:00:00 2001 From: zoujing Date: Mon, 13 Apr 2026 20:20:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A2=84=E7=BA=A6=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ConactSection/index.vue | 6 +++++- src/pages-booking/index.vue | 15 ++++++++++----- .../module/GeneratorPhotoComponent/index.vue | 3 +++ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/pages-booking/components/ConactSection/index.vue b/src/pages-booking/components/ConactSection/index.vue index 97ee884..cb50cb2 100644 --- a/src/pages-booking/components/ConactSection/index.vue +++ b/src/pages-booking/components/ConactSection/index.vue @@ -16,7 +16,7 @@ - + @@ -57,6 +57,10 @@ const props = defineProps({ type: String, default: null, }, + reservationEnabled: { + type: Boolean, + default: false, + }, }); const emit = defineEmits(["update:modelValue", "update:reservationDate"]); diff --git a/src/pages-booking/index.vue b/src/pages-booking/index.vue index db55db7..4b8e378 100644 --- a/src/pages-booking/index.vue +++ b/src/pages-booking/index.vue @@ -70,6 +70,7 @@ v-model="quantity" :userFormList="userFormList" v-model:reservationDate="selectedReservationDate" + :reservationEnabled="orderData.reservationEnabled" /> @@ -212,6 +213,14 @@ const validateUserForms = () => { // 处理支付点击事件 const handlePayClick = ThrottleUtils.createThrottle(async (goodsData) => { console.log("处理支付点击事件", userFormList.value); + // 预约日期,酒店类型不需要 + if (orderData.value.reservationEnabled) { + if (!selectedReservationDate.value) { + uni.showToast({ title: "请选择预约日期", icon: "none" }); + return; + } + } + // 校验用户姓名 if (!validateUserForms()) { return; @@ -243,11 +252,7 @@ const handlePayClick = ThrottleUtils.createThrottle(async (goodsData) => { }; // 预约日期,酒店类型不需要 - if (orderData.value.orderType != 0) { - if (!selectedReservationDate.value) { - uni.showToast({ title: "请选择预约日期", icon: "none" }); - return; - } + if (orderData.value.reservationEnabled) { params.reservationDate = selectedReservationDate.value; } diff --git a/src/pages/index/components/module/GeneratorPhotoComponent/index.vue b/src/pages/index/components/module/GeneratorPhotoComponent/index.vue index a87b129..0ece6b4 100644 --- a/src/pages/index/components/module/GeneratorPhotoComponent/index.vue +++ b/src/pages/index/components/module/GeneratorPhotoComponent/index.vue @@ -56,6 +56,9 @@ onMounted(() => { const jumpClick = () => { const token = getAccessToken(); + + navigateTo('http://192.168.1.14:8080/#/home', { token: token }); + return; if (props.toolCall.componentNameParams.jumpUrl) { navigateTo(props.toolCall.componentNameParams.jumpUrl, { token: token }); }