-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
37 lines (37 loc) · 890 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// app.js
App({
onLaunch() {
const welecome = wx.getStorageSync('welcome');
if (welecome) {
this.welecome=true;
} else {
this.welecome=false;
}
this.globalData.token = wx.getStorageSync('token')
this.globalData.userInfo = wx.getStorageSync('userInfo')
if (this.globalData.token.length) {
this.globalData.isHide = 1
}
wx.getSetting({
success: res => {
if (res.authSetting['scope.userInfo']) {
// 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
}
}
})
},
globalData: {
userInfo: {},
currentMarkerId: 0,
token: '',
isHide: 0, //登录状态
location: {},
baseUrl: "https://serve.fjtbkyc.top",
city: '',
street: '',
address: '', //地址
welecome: true,
imgcount:0,
imageUrl:"", //背景图片临时背景
}
})