diff --git a/h5/pages.json b/h5/pages.json index d35747b..c260ceb 100644 --- a/h5/pages.json +++ b/h5/pages.json @@ -96,6 +96,22 @@ "navigationBarTitleText" : "", "enablePullDownRefresh" : false } + }, + { + "path" : "pages/main/optionalProject/choose", + "style" : + { + "navigationBarTitleText" : "团检预约", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/main/optionalProject/selectType", + "style" : + { + "navigationBarTitleText" : "团检预约", + "enablePullDownRefresh" : false + } } ], "globalStyle": { diff --git a/h5/pages/main/optionalProject/choose.vue b/h5/pages/main/optionalProject/choose.vue new file mode 100644 index 0000000..95e1113 --- /dev/null +++ b/h5/pages/main/optionalProject/choose.vue @@ -0,0 +1,238 @@ + + + diff --git a/h5/pages/main/optionalProject/optionalDetails.vue b/h5/pages/main/optionalProject/optionalDetails.vue index 797890b..8a55f5d 100644 --- a/h5/pages/main/optionalProject/optionalDetails.vue +++ b/h5/pages/main/optionalProject/optionalDetails.vue @@ -18,6 +18,8 @@ let personId = ref(""); // 患者id let groupId = ref(""); // 团检id let tabIndex = ref(0); // 标签索引 let totalPrice = ref(0); // 总折扣价格 +let patientInfo = ref({}); // 就诊人信息 (包括套餐) +let groupInfo = ref({}); // 团检信息 const $props = defineProps({ comboId: { @@ -36,7 +38,7 @@ const $props = defineProps({ const mountedAction = async () => { selectIds.value = $props.itemIds?.split(",") || []; - + console.log($store.user); comboId.value = $props.comboId || ""; personId.value = $props.personId || ""; groupId.value = $props.groupId || ""; @@ -57,10 +59,14 @@ const getBuyInfo = async () => { }; const response = await $api("BuyInfo", obj); $response(response, () => { + uni.hideLoading(); + if (groupId.value) { + groupInfo.value = response.data.group_info[0]; + return; + } comboInfo.value = response.data.combo_info; itemsInfo.value = response.data.items_info; totalPrice.value = response.data.true_price; - uni.hideLoading(); }); }; @@ -127,7 +133,7 @@ onShow(() => { " /> - + { {{ comboInfo.hospital_name }} + + + + + 您好, + {{groupInfo.name}} + + + + + 单位名称: + {{ groupInfo.group_name }} + + + 部门名称: + {{ groupInfo.group_name }} + + + 套餐名称: + {{ groupInfo.combo_name }} + + + - + { class="mt-20rpx bg-#fff py-40rpx px-14rpx box-border flex-col flex" > - + 套餐项目({{ comboInfo.items?.length }}项) +/** + * name: + * user:sa0ChunLuyu + * date:2024年9月11日 19:24:50 + */ +import { ref } from "vue"; +import { $api, $response } from "@/api"; +import { onShow } from "@dcloudio/uni-app"; +import { useStore } from "@/store"; +const $store = useStore(); + +let groupInfo = ref({}); + +const mountedAction = () => { + groupInfo.value = $store.getGroupInfo(); + console.log(groupInfo.value); +}; + +const config_ref = ref(null); +const configRef = (e) => { + if (!config_ref.value) { + config_ref.value = e; + mountedAction(); + } +}; + +onShow(() => { + if (!!config_ref.value) { + mountedAction(); + } +}); + +const toDetails = (type) => { + let url = ""; + if(type == 1){ + url = "/pages/main/optionalProject/optionalProject?projectId=" + groupInfo.project_id; + }else{ + url = "/pages/main/optionalProject/optionalDetails"; + } + uni.navigateTo({ + url: url, + }); +}; + + + + diff --git a/h5/static/assets/taocan.png b/h5/static/assets/taocan.png new file mode 100644 index 0000000..24b126b Binary files /dev/null and b/h5/static/assets/taocan.png differ diff --git a/h5/static/assets/xiangmu.png b/h5/static/assets/xiangmu.png new file mode 100644 index 0000000..1446513 Binary files /dev/null and b/h5/static/assets/xiangmu.png differ diff --git a/h5/store/index.js b/h5/store/index.js index 7a8dae6..01dca1e 100644 --- a/h5/store/index.js +++ b/h5/store/index.js @@ -6,8 +6,10 @@ export const useStore = defineStore('counter', { state: () => ({ user: false, config: false, + patientInfo: {}, // 病人信息 + groupInfo: {}, // 团检信息 save: { - hospital: 0, + hospital: 1, doctor: 1, }, api_map: {}, @@ -15,6 +17,20 @@ export const useStore = defineStore('counter', { loading: 0, }), actions: { + setPatientInfo(info){ + this.patientInfo = info; + uni.setStorageSync('PATIENT_INFO', JSON.stringify(info)); + }, + getPatientInfo(){ + return JSON.parse(uni.getStorageSync('PATIENT_INFO')) || this.patientInfo; + }, + setGroupInfo(info){ + this.groupInfo = info; + uni.setStorageSync('GROUP_INFO', JSON.stringify(info)); + }, + getGroupInfo(){ + return JSON.parse(uni.getStorageSync('GROUP_INFO')) || this.groupInfo; + }, resetSaveInfo() { this.save = { hospital: 0,