From 8733d995ec5ff0ad02a6e77e6daaed165ca56230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E6=80=AA?= <690927457@qq.com> Date: Fri, 29 Dec 2023 00:59:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 22 +++++++++++++++++----- pages/user/userInfo.vue | 11 ++++++++++- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index bc1c1a1..ca96673 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -11,10 +11,11 @@ import {useStore} from '@/store/index.js' // import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue' const store = useStore() + const h_index = ref(0) onShow((e) => { getLbtList() if(store.userInfo && !store.operation_info) { //登录过 且 未填写手术信息 - // getHospitalList() + getHospitalList() setTimeout(()=>{ inputDialog.value.open() },0) @@ -26,7 +27,7 @@ }) // 变量 - const hospitals = ref(null) + const hospitals = ref([]) // const hospitals_show = ref(false) const inputDialog = ref() const inputClose = ref() @@ -52,6 +53,7 @@ const res = await api.getHospitalList(h_queryParams.value) if(res.code == 0) { hospitals.value = res.data.list + console.log(hospitals.value ) } } async function getLbtList() { // 获取轮播图 @@ -97,7 +99,7 @@ // blur_h.value = 0 } function toBlur(){ - hospitals.value = null + // hospitals.value = null } async function toSave() { if(isSurgery.value == -1) { @@ -114,7 +116,9 @@ isSurgery:parseInt(isSurgery.value), surgery_time:surgery_time.value, userId:user_info.userId, - hospitalId:choosed_h.value?.ID + // hospitalId:choosed_h.value?.ID + hospitalId:hospitals.value[h_index.value]?.ID + } // console.log(h_query);return const res = await api.hospital(h_query) @@ -169,6 +173,11 @@ url:"/pages/index/note_list?index="+index }) } + + function bindPickerChange(e) { + console.log(hospitals.value ) + h_index.value = e.detail.value + }