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
| // app.js
| App({
| onLaunch() {
| // 展示本地存储能力
| const logs = wx.getStorageSync('logs') || []
| logs.unshift(Date.now())
| wx.setStorageSync('logs', logs)
|
| // 登录
| wx.login({
| success: res => {
| // 发送 res.code 到后台换取 openId, sessionKey, unionId
| }
| })
| },
| globalData: {
| sessionId:'2024071616542300009',
| clientId:'2024062716083600006',
| tag:'ym',
| userInfo: null,
| userId:"",
| userCode:"",
| token:""
| }
| })
|
|