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.

30 lines
686 B

4 years ago
// app.js
4 years ago
require('./page-extend')
4 years ago
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 userInfo=wx.getStorageSync("userInfo") || null
4 years ago
if(userInfo){
this.globalData.token=userInfo.token
this.globalData.uid = userInfo.uid
this.globalData.nickName=userInfo.nickName
this.globalData.avatarUrl=userInfo.avatarUrl
4 years ago
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
})