Browse Source

bug fix

master
kola-web 2 weeks ago
parent
commit
84c2f52cf7
  1. 2
      project.config.json
  2. 15
      src/app.ts
  3. 4
      src/doctor/pages/my/index.ts
  4. 2
      src/pages/index/index.ts
  5. 2
      src/pages/tourists/index.ts
  6. 4
      src/pages/tourists/index.wxml

2
project.config.json

@ -66,7 +66,7 @@ @@ -66,7 +66,7 @@
],
"include": []
},
"appid": "wxaa9a18b72dd4b313",
"appid": "wxe9f978b29ff5ab5d",
"scripts": {
"beforeCompile": "pnpm run beforeCompile",
"beforePreview": "pnpm run beforeCompile",

15
src/app.ts

@ -24,15 +24,15 @@ App<IAppOption>({ @@ -24,15 +24,15 @@ App<IAppOption>({
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<IAppOption>({ @@ -56,12 +56,13 @@ App<IAppOption>({
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({

4
src/doctor/pages/my/index.ts

@ -192,8 +192,8 @@ Page({ @@ -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',
})
})
})

2
src/pages/index/index.ts

@ -315,7 +315,7 @@ Page({ @@ -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)

2
src/pages/tourists/index.ts

@ -36,7 +36,7 @@ Page({ @@ -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)

4
src/pages/tourists/index.wxml

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
</view>
<image class="page-banner" src="{{imageUrl}}start1.png?t={{Timestamp}}"></image>
<view class="page-options">
<view class="o-item" bindtap="goToPharmacist">我是工作人员</view>
<view class="o-item" bindtap="goToPromoter">我是地推人员</view>
<view class="o-item" bindtap="goToPharmacist">我是店员</view>
<view class="o-item" bindtap="goToPromoter">我是工作人员</view>
</view>
</view>

Loading…
Cancel
Save