首次提交
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
App({
|
||||
globalData: {
|
||||
token: '',
|
||||
user: null,
|
||||
apiUrl: 'http://localhost:8080'
|
||||
},
|
||||
onLaunch() {
|
||||
const token = wx.getStorageSync('token')
|
||||
if (token) {
|
||||
this.globalData.token = token
|
||||
try {
|
||||
const user = wx.getStorageSync('user')
|
||||
if (user) this.globalData.user = user
|
||||
} catch(e) {}
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user