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, });