全局登录调整

This commit is contained in:
2022-12-16 21:52:41 +08:00
parent 654f71789a
commit f9eb77079b
19 changed files with 92 additions and 279 deletions

13
app.js
View File

@@ -2,20 +2,9 @@
import api from './utils/api.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: {
userInfo: null
},
$api: api,
})