From 1b8e7afcc8c653b4ec3ec4a41eee66bece2bca6d Mon Sep 17 00:00:00 2001 From: yanzai Date: Sun, 23 Feb 2025 19:19:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=A2=E6=A3=80=20=E9=80=89=E4=BA=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- h5/pages/main/tj/choose.vue | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/h5/pages/main/tj/choose.vue b/h5/pages/main/tj/choose.vue index 202bcbc..ca409e0 100644 --- a/h5/pages/main/tj/choose.vue +++ b/h5/pages/main/tj/choose.vue @@ -37,14 +37,38 @@ const configRef = (e) => { getPersonList(); } }; - +const getUserInfo = async () => { + const response = await $api("UserInfo"); + $response(response, () => { + // $store.user = response.data.info + $store.setUser(response.data.info); + $store.setYytjInfo({}); // 切换体检人的时候清空预约信息 + + let buyinfo=$store.getBuyInfo() + buyinfo.person_id=response.data.info.person_id + $store.setBuyInfo(buyinfo); + + // uni.$lu.toast("切换成功"); + // uni.navigateBack({ + // delta: 1, + // }); + }); +}; const choosePersonClick = async (info) => { +uni.showLoading(); + const response1 = await $api("SetDefaultPerson", { + person_id: info.id, + }); + $response(response1, () => { + getUserInfo(); + }); // 查询团检ID const response = await $api("GetGroupUnit", { hospital_id: $store.save.hospital, id_number: info.id_number, phone: info.phone, }); + uni.hideLoading(); $response(response, () => { unitList.value = response.data.unit; if (response.data.unit.length > 1) {