From 90b72393be01e57914fac7927feb1b982274d31d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E6=80=AA?= <690927457@qq.com> Date: Wed, 20 Mar 2024 22:38:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E8=AE=A2=E9=98=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/done.vue | 9 +++++++++ pages/index/index.vue | 9 +++------ pages/index/note_list.vue | 27 +++++++++++++++++++++++++++ pages/user/userInfo.vue | 4 ++-- store/index.js | 2 +- 5 files changed, 42 insertions(+), 9 deletions(-) diff --git a/pages/index/done.vue b/pages/index/done.vue index 44d729e..0199314 100644 --- a/pages/index/done.vue +++ b/pages/index/done.vue @@ -23,6 +23,15 @@ swiper_h.value = store.systemInfo.windowHeight } getList() + uni.requestSubscribeMessage({ +          tmplIds: ['PgxoZOOSDgBcmIGd_EVLDkRzNPA6Cr4MWeG9m4OO3n0'], +          success: (res) => { +              console.log(res); +         }, + fail(res) { +  console.log(res); + } +     }) }) onPullDownRefresh(()=> { // 下拉刷新 init() diff --git a/pages/index/index.vue b/pages/index/index.vue index 220ef84..06818fc 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -19,12 +19,9 @@ if(!store.userInfo) { //没登录过 // console.log("没有store.userInfo",store.userInfo) // getHospitalList() - setTimeout(()=>{ - inputDialog.value.open() - },0) - // uni.navigateTo({ - // url:'/pages/login/login' - // }) + // setTimeout(()=>{ + // inputDialog.value.open() + // },0) } else { setTimeout(()=>{ inputDialog.value.close() diff --git a/pages/index/note_list.vue b/pages/index/note_list.vue index e3db12f..3d41e7c 100644 --- a/pages/index/note_list.vue +++ b/pages/index/note_list.vue @@ -99,6 +99,21 @@ uni.showLoading({ mask:true }) + // 判断是否登录 + let is_login = util.checkLogin() + if(!is_login) { + uni.showToast({ + title:'请先登录', + icon:"error", + duration:2000, + mask:true, + success() { + store.afterFailLogin(2000) + } + }) + return + } + // 判断是否有手术信息 let operation_info = null if(uni.getStorageSync('operation_info')) { operation_info = JSON.parse(uni.getStorageSync('operation_info')) @@ -133,6 +148,18 @@ } }) } + } else { + uni.showToast({ + title:'请填写手术信息', + icon:"error", + duration:2000, + mask:true, + success() { + setTimeout(() => { + store.toProfile() + },2000) + } + }) } uni.hideLoading(); } diff --git a/pages/user/userInfo.vue b/pages/user/userInfo.vue index b0734ef..f3d231d 100644 --- a/pages/user/userInfo.vue +++ b/pages/user/userInfo.vue @@ -16,7 +16,7 @@ } else { // 已登录 userinfo.value = JSON.parse(uni.getStorageSync('userInfo')) h_info.value = userinfo.value - h_info.value.surgery_time = h_info.value.SurgeryTime + h_info.value.surgery_time = h_info.value.surgery_time userinfo.value.avatar = uni.getStorageSync('avatarUrl') h_index.value = hospitals.value.findIndex((item,i) => { return item.ID == userinfo.value.HospitalId @@ -257,7 +257,7 @@ -