From c7a2ff6f4af417f9ad24ab547405404f5642d27a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E4=BD=B3=E5=AE=87?= <17601616548@163.com> Date: Tue, 15 Oct 2024 00:11:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=8E=A5=E5=8F=A3=E5=92=8C?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E9=A2=84=E7=BA=A6=E6=8E=A5=E5=8F=A3=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=A4=9A=E9=80=89=E4=B8=80=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- h5/pages/main/combo/combo.vue | 14 ++++++++------ h5/pages/main/tj/tjxq.vue | 36 +++++++++++++++++++++++++---------- h5/pages/main/tjyy/tjyy.vue | 1 + h5/store/index.js | 10 +++++++++- 4 files changed, 44 insertions(+), 17 deletions(-) diff --git a/h5/pages/main/combo/combo.vue b/h5/pages/main/combo/combo.vue index 564e02d..8977926 100644 --- a/h5/pages/main/combo/combo.vue +++ b/h5/pages/main/combo/combo.vue @@ -276,6 +276,7 @@ const buyClick = async (item) => { popupMultiple.value.open("center"); multipleIndex.value = 0; itemIds.value = []; + $store.setDuoXuanYi([]); itemId.value = ""; multipleList.value = item.duo_xuan_yi; return; @@ -288,7 +289,10 @@ const nextItemClick = () => { uni.$lu.toast("请选择项目"); return; } - itemIds.value.push(itemId.value); + itemIds.value.push({ + item_id: itemId.value, + zu_name: multipleList.value[multipleIndex.value]["0"]["zu_name"], + }); if (multipleIndex.value == multipleList.value.length - 1) { toDetail(); return; @@ -304,9 +308,7 @@ const toDetail = () => { // 团检把团检ID加上 query += "&groupId=" + $props.groupId; } - if (itemIds.value.length) { - query += "&itemIds=" + itemIds.value.join(","); - } + $store.setDuoXuanYi(itemIds.value); // 个检只要套餐ID // 预约 跳转到个检/团检套餐详情 popupMultiple.value.close(); @@ -495,14 +497,14 @@ const toRouter = () => { {{ item.item_name }} - ¥ + ¥ {{ item.price }} { group_id: groupId.value, item_ids: selectIds.value, hospital: $store.save_info.hospital, + duo_xuan_yi: $store.getDuoXuanYi(), }); $store.setYytjInfo({}); uni.navigateTo({ @@ -135,6 +136,7 @@ const getBuyInfo = async () => { hospital: $store.save_info.hospital, person_id: personId.value, group_id: groupId.value, + duo_xuan_yi: $store.getDuoXuanYi(), }; const response = await $api("BuyInfo", obj); $response(response, () => { @@ -383,18 +385,32 @@ onShow(() => { 检查指标意义 - - - - {{ val.keshi_name }}({{ val.children.length }}) - - - - {{ v.name }} + + + + {{ val.keshi_name }}({{ val.children.length }}) + + + + {{ v.name }} + + {{ + v.desc || "-" + }} - {{v.desc || "-" }} - diff --git a/h5/pages/main/tjyy/tjyy.vue b/h5/pages/main/tjyy/tjyy.vue index 940c8ac..8511bc4 100755 --- a/h5/pages/main/tjyy/tjyy.vue +++ b/h5/pages/main/tjyy/tjyy.vue @@ -190,6 +190,7 @@ const comfrimyy = async () => { plan_id: plan_id, plan_nmr_id: plan_nmr_id, doctor: yytjInfo.value?.doctor_name || "", + duo_xuan_yi: $store.getDuoXuanYi(), }; console.log(obj); diff --git a/h5/store/index.js b/h5/store/index.js index 28f6caa..d71664d 100644 --- a/h5/store/index.js +++ b/h5/store/index.js @@ -10,6 +10,7 @@ export const useStore = defineStore('counter', { config: false, groupInfo: {}, // 团检信息 combo_compare: [], // 套餐对比 + duo_xuan_yi: [], // 多选一 save: { hospital: 1, doctor: 1, @@ -27,9 +28,16 @@ export const useStore = defineStore('counter', { this.combo_compare = comboContrast; uni.setStorageSync('COMBO_CONTRAST', JSON.stringify(this.combo_compare)); }, - getComboContrast(){ + getComboContrast() { return JSON.parse(uni.getStorageSync('COMBO_CONTRAST') || '[]') || this.combo_compare; }, + setDuoXuanYi(duoXuanYi) { + this.duo_xuan_yi = duoXuanYi; + uni.setStorageSync('DUO_XUAN_YI', JSON.stringify(duoXuanYi)) + }, + getDuoXuanYi() { + return JSON.parse(uni.getStorageSync('DUO_XUAN_YI') || '[]') || this.duo_xuan_yi; + }, setTjbgInfo(tjbgInfo) { this.tjbgInfo = tjbgInfo; uni.setStorageSync('TJBG_INFO', JSON.stringify(tjbgInfo));