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
30 lines
686 B
// app.js
|
|
|
|
require('./page-extend')
|
|
|
|
|
|
App({
|
|
onLaunch(){
|
|
var that =this
|
|
wx.getSystemInfo({
|
|
success(res) {
|
|
//获取屏幕的宽成功
|
|
that.globalData.screenWidth =res.screenWidth
|
|
that.globalData.screenHeight=res.screenHeight
|
|
that.globalData.statusBarHeight = res.statusBarHeight
|
|
}})
|
|
let userInfo=wx.getStorageSync("userInfo") || null
|
|
if(userInfo){
|
|
this.globalData.token=userInfo.token
|
|
this.globalData.uid = userInfo.uid
|
|
this.globalData.nickName=userInfo.nickName
|
|
this.globalData.avatarUrl=userInfo.avatarUrl
|
|
this.globalData.userInfo=userInfo
|
|
}
|
|
|
|
},
|
|
|
|
globalData: {
|
|
userInfo: null,token: null, uid: null
|
|
}
|
|
}) |