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