From 95e7d7d85689110e7ca844a56d1c30e62d5d5ccd Mon Sep 17 00:00:00 2001 From: yanzai Date: Tue, 11 Feb 2025 16:32:32 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E4=BD=93=E6=A3=80=E4=BA=BA?= =?UTF-8?q?=E6=97=B6=E5=88=A4=E6=96=AD=E5=A5=97=E9=A4=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Laravel/app/Http/Controllers/API/H5/ComboController.php | 1 + h5/pages/main/index/index.vue | 5 +++++ h5/pages/main/tj/tjxq.vue | 1 + h5/pages/user/choose/choose.vue | 4 ++++ 4 files changed, 11 insertions(+) diff --git a/Laravel/app/Http/Controllers/API/H5/ComboController.php b/Laravel/app/Http/Controllers/API/H5/ComboController.php index e606113..69a58a2 100644 --- a/Laravel/app/Http/Controllers/API/H5/ComboController.php +++ b/Laravel/app/Http/Controllers/API/H5/ComboController.php @@ -368,6 +368,7 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4) } $combo_info['hospital_name'] = $hospital->name; $combo_info['combo_name'] = $combo->name; + $combo_info['combo_sex'] = $combo->sex; $combo_info['crowd_name'] = $combo->crowd_name; $combo_info['img'] = $combo->cover; $combo_info['sale_count'] = $combo->sale_count==null?0:$combo->sale_count; diff --git a/h5/pages/main/index/index.vue b/h5/pages/main/index/index.vue index 4e50284..38d6514 100644 --- a/h5/pages/main/index/index.vue +++ b/h5/pages/main/index/index.vue @@ -234,6 +234,11 @@ getLong() } getUserInfo() + let buyinfo=$store.getBuyInfo() + buyinfo.combo_id='' + buyinfo.combo_sex='' + $store.setBuyInfo(buyinfo) + $store.setCheckupTypeId({}); $store.setDuoXuanYi({}); $store.setPeiOuUser({}); diff --git a/h5/pages/main/tj/tjxq.vue b/h5/pages/main/tj/tjxq.vue index 05059ce..0bfc72e 100644 --- a/h5/pages/main/tj/tjxq.vue +++ b/h5/pages/main/tj/tjxq.vue @@ -137,6 +137,7 @@ if (tabIndex.value == 1 && buyText.value == "立即购买") { $store.setBuyInfo({ combo_id: comboId.value, + combo_sex:comboInfo.value.combo_sex, person_id: personId.value, group_id: groupId.value, item_ids: selectIds.value, diff --git a/h5/pages/user/choose/choose.vue b/h5/pages/user/choose/choose.vue index baece74..e709e6a 100644 --- a/h5/pages/user/choose/choose.vue +++ b/h5/pages/user/choose/choose.vue @@ -43,6 +43,10 @@ const getUserInfo = async () => { }); }; const choosePersonClick = async (info) => { + if($store.getBuyInfo().combo_sex && info.sex != 0 && info.sex != $store.getBuyInfo().combo_sex ){ + uni.$lu.toast("当前套餐性别与此用户不符,不能预约"); + return false; + } const response = await $api("SetDefaultPerson", { person_id: info.id, });