// app.js App({ onLaunch() { console.log('APP onLaunch'); const that = this wx.getStorage({ key: 'accessToken', success (res) { that.globalData.accessToken = res.data } }) }, globalData: { isBindWechat: false, accessToken: '', workerId: '', userName: '', headImg: '', device: null, isNeedAccountPwd: false } })