diff --git a/project.config.json b/project.config.json index a125322..ebd8b30 100644 --- a/project.config.json +++ b/project.config.json @@ -66,7 +66,7 @@ ], "include": [] }, - "appid": "wxaa9a18b72dd4b313", + "appid": "wxe9f978b29ff5ab5d", "scripts": { "beforeCompile": "pnpm run beforeCompile", "beforePreview": "pnpm run beforeCompile", diff --git a/src/app.ts b/src/app.ts index 3fd1029..e8cb4f8 100644 --- a/src/app.ts +++ b/src/app.ts @@ -24,15 +24,15 @@ App({ globalData: { // dev // appid:wxe9f978b29ff5ab5d - // url: 'https://app.yd.hbraas.com', - // upFileUrl: 'https://app.yd.hbraas.com/', - // imageUrl: 'https://app.yd.hbraas.com/images/', + url: 'https://app.yd.hbraas.com', + upFileUrl: 'https://app.yd.hbraas.com/', + imageUrl: 'https://app.yd.hbraas.com/images/', // pro // appid:wxaa9a18b72dd4b313 - url: 'https://app.hghealth.hbsaas.com', - upFileUrl: 'https://app.hghealth.hbsaas.com/', - imageUrl: 'https://app.hghealth.hbsaas.com/images/', + // url: 'https://app.hghealth.hbsaas.com', + // upFileUrl: 'https://app.hghealth.hbsaas.com/', + // imageUrl: 'https://app.hghealth.hbsaas.com/images/', Timestamp: dayjs().valueOf(), @@ -56,12 +56,13 @@ App({ obeyMuteSwitch: false, mixWithOther: false, }) + + this.startLogin() }, onShow(options) { if (options.query.scene) { this.globalData.scene = parseScene(options.query.scene) as { workerId: string } } - this.startLogin() }, startLogin(callback?: () => void) { wx.login({ diff --git a/src/doctor/pages/my/index.ts b/src/doctor/pages/my/index.ts index 6a55fad..9ad92b9 100644 --- a/src/doctor/pages/my/index.ts +++ b/src/doctor/pages/my/index.ts @@ -192,8 +192,8 @@ Page({ url: '/app/pharmacist/pharmacist/logout', }).then(() => { app.startLogin(() => { - wx.reLaunch({ - url: '/pages/work/index', + wx.restartMiniProgram({ + path: '/pages/work/index', }) }) }) diff --git a/src/pages/index/index.ts b/src/pages/index/index.ts index 74161c6..360cc80 100644 --- a/src/pages/index/index.ts +++ b/src/pages/index/index.ts @@ -315,7 +315,7 @@ Page({ filePath: avatarUrl, name: 'file', header: { - Authorization: wx.getStorageSync('token'), + Authorization: app.globalData.initLoginInfo.token, }, success: (res) => { const data = JSON.parse(res.data) diff --git a/src/pages/tourists/index.ts b/src/pages/tourists/index.ts index e85b503..fbbcda5 100644 --- a/src/pages/tourists/index.ts +++ b/src/pages/tourists/index.ts @@ -36,7 +36,7 @@ Page({ filePath: avatarUrl, name: 'file', header: { - Authorization: wx.getStorageSync('token'), + Authorization: app.globalData.initLoginInfo.token, }, success: (res) => { const data = JSON.parse(res.data) diff --git a/src/pages/tourists/index.wxml b/src/pages/tourists/index.wxml index 757b08c..91e4cde 100644 --- a/src/pages/tourists/index.wxml +++ b/src/pages/tourists/index.wxml @@ -14,7 +14,7 @@ - 我是药店工作人员 - 我是地推人员 + 我是店员 + 我是工作人员