You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
606 B

// app.js
App({
onLaunch(){
var that =this
wx.getSystemInfo({
success(res) {
//获取屏幕的宽成功
that.globalData.screenWidth =res.screenWidth
that.globalData.screenHeight=res.screenHeight
}})
let user_storage=wx.getStorageSync("user_storage") || null
let userInfo=wx.getStorageSync("userInfo") || null
if(user_storage){
let token =user_storage.token
let uid = user_storage.uid
this.globalData.token=token
this.globalData.uid=uid
this.globalData.userInfo=userInfo
}
},
globalData: {
userInfo: null,token: null, uid: null
}
})