bug fix and performance improvements

This commit is contained in:
quantulr
2023-08-18 17:32:18 +08:00
parent 3c6ab550cf
commit e750b9be9c
923 changed files with 46650 additions and 9 deletions

View File

@ -1,11 +1,17 @@
import { getToken } from "./utils/settings"
// app.ts
App<IAppOption>({
globalData: {},
globalData: {
authToken: undefined,
role: undefined
},
onLaunch() {
// 展示本地存储能力
const logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
this.globalData.authToken = getToken()
// 登录
wx.login({
@ -15,4 +21,11 @@ App<IAppOption>({
},
})
},
onShow() {
// if (!this.globalData.authToken) {
// wx.redirectTo({
// url: "pages/login/login"
// })
// }
},
})