From d7d50e1210f62581ae136ca6234dc69b77a8f2d3 Mon Sep 17 00:00:00 2001 From: zoujing Date: Thu, 26 Mar 2026 16:01:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=8B=E5=8D=95=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ConactSection/index.vue | 25 ++++++++++--------- src/pages-booking/index.vue | 14 +++++------ 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/pages-booking/components/ConactSection/index.vue b/src/pages-booking/components/ConactSection/index.vue index 65a4b1d..97ee884 100644 --- a/src/pages-booking/components/ConactSection/index.vue +++ b/src/pages-booking/components/ConactSection/index.vue @@ -20,19 +20,20 @@ - 联系方式 + 联系方式 - 联系手机 + 联系人姓名 - + + + + + + 手机号码 + + @@ -50,7 +51,7 @@ const props = defineProps({ }, userFormList: { type: Array, - default: () => [{ contactPhone: "" }], + default: () => [{ visitorName: "", contactPhone: "" }], }, reservationDate: { type: String, diff --git a/src/pages-booking/index.vue b/src/pages-booking/index.vue index 10abe1f..f6ce226 100644 --- a/src/pages-booking/index.vue +++ b/src/pages-booking/index.vue @@ -197,7 +197,7 @@ const validateUserForms = () => { }); if (invalidUsers.length) { - uni.showToast({ title: "请填写住客姓名", icon: "none" }); + uni.showToast({ title: "请填写姓名", icon: "none" }); return false; } @@ -211,14 +211,12 @@ const handlePayClick = ThrottleUtils.createThrottle(async (goodsData) => { try { console.log("处理支付点击事件", userFormList.value); - // 判断是酒店类型 - if (goodsData.commodityTypeCode === "0") { - // 校验用户姓名 - if (!validateUserForms()) { - uni.hideLoading(); - return; - } + // 校验用户姓名 + if (!validateUserForms()) { + uni.hideLoading(); + return; } + // 校验手机号 if (!PhoneUtils.validatePhone(userFormList.value[0].contactPhone)) { uni.hideLoading();