From 5d6abb0219b11e6151a1e7afb4ec6da19b307b6b 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 14:44:01 +0800 Subject: [PATCH] fix bug --- config/index.js | 2 +- pages/index/index.vue | 67 +++++++++------- pages/login/login.vue | 169 ++++++++++++++++------------------------ pages/user/index.vue | 9 ++- pages/user/userInfo.vue | 59 ++++++-------- store/index.js | 91 ++++++++++++++++++++-- utils/index.js | 6 +- 7 files changed, 227 insertions(+), 176 deletions(-) diff --git a/config/index.js b/config/index.js index aecdf1b..bd6fcc9 100644 --- a/config/index.js +++ b/config/index.js @@ -1,6 +1,6 @@ // isdev 为 true 表示开发环境 false 表示发布环境 const isdev = false; -const baseUrl = isdev ? 'https://4571de69.r29.cpolar.top' : 'https://api.jimingyiliao.com';// 办公室接口 & 测试环境 +const baseUrl = isdev ? 'http://318ca56c.r28.cpolar.top' : 'https://api.jimingyiliao.com';// 办公室接口 & 测试环境 // const baseUrl = isdev ? 'https://api.jimingyiliao.com' : 'http://eb467b6.r19.cpolar.top';// 办公室接口 & 测试环境 // const baseUrl = isdev ? 'http://707788f2.r1.cpolar.top' : 'http://eb467b6.r19.cpolar.top';// 办公室接口 & 测试环境 // const baseUrl = isdev ? 'http://192.168.1.133:8899' : 'https://api.gwkjxb.com';// 办公室接口 & 正式环境 diff --git a/pages/index/index.vue b/pages/index/index.vue index ec70403..220ef84 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -15,16 +15,21 @@ onShow((e) => { getLbtList() // console.log("store:",store) - // if(store.userInfo && !store.operation_info) { //登录过 且 未填写手术信息 - // getHospitalList() - // setTimeout(()=>{ - // inputDialog.value.open() - // },0) - // } - // let s = `$http({code:'1s'});if` - // // let arr = /\$http\((\S*)\)\;if/.exec(s); - // let arr = s.match(/\$http\((.*)\)\;if/) - // console.log(arr[1]) + // if(!store.userInfo && !store.operation_info) { //没登录过 且 未填写手术信息 + if(!store.userInfo) { //没登录过 + // console.log("没有store.userInfo",store.userInfo) + // getHospitalList() + setTimeout(()=>{ + inputDialog.value.open() + },0) + // uni.navigateTo({ + // url:'/pages/login/login' + // }) + } else { + setTimeout(()=>{ + inputDialog.value.close() + },0) + } }) // 变量 @@ -176,9 +181,13 @@ } function bindPickerChange(e) { - console.log(hospitals.value ) h_index.value = e.detail.value } + // 手机号登录 + async function getPhoneNumber (e) { + await store.getAccess_token({code:e.detail.code}) + toClose() + }