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.

27 lines
668 B

4 years ago
// app.js
App({
4 years ago
onLaunch(){
var that =this
wx.getSystemInfo({
success(res) {
//获取屏幕的宽成功
that.globalData.screenWidth =res.screenWidth
that.globalData.screenHeight=res.screenHeight
4 years ago
that.globalData.statusBarHeight = res.statusBarHeight
4 years ago
}})
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
}
4 years ago
4 years ago
},
4 years ago
globalData: {
4 years ago
userInfo: null,token: null, uid: null
4 years ago
}
4 years ago
})