Files
Wx_WxCheck_Prod/CommunicationRecords/app.js
2025-12-11 15:37:54 +08:00

26 lines
483 B
JavaScript

// 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: {
userInfo: null,
baseUrl: 'https://你的域名', // 后端 API 根地址
userKey:"",
avatarUrl:"",
weChatName:"",
}
})