创建新的小程序,进出码,体温上报功能迁移基本完成
This commit is contained in:
23
weixin-miniprogram/app.js
Normal file
23
weixin-miniprogram/app.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// 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: {
|
||||
debugMode: true, // 是否展示调试内容
|
||||
baseUrl: true ? // Api 请求域名 不带最后的 /
|
||||
"https://epp.only4.work" :
|
||||
"http://localhost",
|
||||
userInfo: null
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user