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 @@
], ],
"include": [] "include": []
}, },
"appid": "wxaa9a18b72dd4b313", "appid": "wxe9f978b29ff5ab5d",
"scripts": { "scripts": {
"beforeCompile": "pnpm run beforeCompile", "beforeCompile": "pnpm run beforeCompile",
"beforePreview": "pnpm run beforeCompile", "beforePreview": "pnpm run beforeCompile",

15
src/app.ts

@ -24,15 +24,15 @@ App<IAppOption>({
globalData: { globalData: {
// dev // dev
// appid:wxe9f978b29ff5ab5d // appid:wxe9f978b29ff5ab5d
// url: 'https://app.yd.hbraas.com', url: 'https://app.yd.hbraas.com',
// upFileUrl: 'https://app.yd.hbraas.com/', upFileUrl: 'https://app.yd.hbraas.com/',
// imageUrl: 'https://app.yd.hbraas.com/images/', imageUrl: 'https://app.yd.hbraas.com/images/',
// pro // pro
// appid:wxaa9a18b72dd4b313 // appid:wxaa9a18b72dd4b313
url: 'https://app.hghealth.hbsaas.com', // url: 'https://app.hghealth.hbsaas.com',
upFileUrl: 'https://app.hghealth.hbsaas.com/', // upFileUrl: 'https://app.hghealth.hbsaas.com/',
imageUrl: 'https://app.hghealth.hbsaas.com/images/', // imageUrl: 'https://app.hghealth.hbsaas.com/images/',
Timestamp: dayjs().valueOf(), Timestamp: dayjs().valueOf(),
@ -56,12 +56,13 @@ App<IAppOption>({
obeyMuteSwitch: false, obeyMuteSwitch: false,
mixWithOther: false, mixWithOther: false,
}) })
this.startLogin()
}, },
onShow(options) { onShow(options) {
if (options.query.scene) { if (options.query.scene) {
this.globalData.scene = parseScene(options.query.scene) as { workerId: string } this.globalData.scene = parseScene(options.query.scene) as { workerId: string }
} }
this.startLogin()
}, },
startLogin(callback?: () => void) { startLogin(callback?: () => void) {
wx.login({ wx.login({

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

@ -192,8 +192,8 @@ Page({
url: '/app/pharmacist/pharmacist/logout', url: '/app/pharmacist/pharmacist/logout',
}).then(() => { }).then(() => {
app.startLogin(() => { app.startLogin(() => {
wx.reLaunch({ wx.restartMiniProgram({
url: '/pages/work/index', path: '/pages/work/index',
}) })
}) })
}) })

2
src/pages/index/index.ts

@ -315,7 +315,7 @@ Page({
filePath: avatarUrl, filePath: avatarUrl,
name: 'file', name: 'file',
header: { header: {
Authorization: wx.getStorageSync('token'), Authorization: app.globalData.initLoginInfo.token,
}, },
success: (res) => { success: (res) => {
const data = JSON.parse(res.data) const data = JSON.parse(res.data)

2
src/pages/tourists/index.ts

@ -36,7 +36,7 @@ Page({
filePath: avatarUrl, filePath: avatarUrl,
name: 'file', name: 'file',
header: { header: {
Authorization: wx.getStorageSync('token'), Authorization: app.globalData.initLoginInfo.token,
}, },
success: (res) => { success: (res) => {
const data = JSON.parse(res.data) const data = JSON.parse(res.data)

4
src/pages/tourists/index.wxml

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

Loading…
Cancel
Save