2023-03-17 04:55:02 +08:00
|
|
|
// app.js
|
2023-04-17 02:36:04 +08:00
|
|
|
|
|
|
|
const toggleCustomTabBar = require('./custom-tab-bar/toggleCustomTabBar')
|
|
|
|
|
2023-03-17 04:55:02 +08:00
|
|
|
App({
|
2023-04-17 02:36:04 +08:00
|
|
|
async onLaunch() {
|
|
|
|
|
|
|
|
// 获取下拉框信息
|
|
|
|
toggleCustomTabBar.updateConfig(this.globalData.baseUrl)
|
|
|
|
|
|
|
|
// // 展示本地存储能力
|
|
|
|
// const logs = wx.getStorageSync('logs') || []
|
|
|
|
// logs.unshift(Date.now())
|
|
|
|
// wx.setStorageSync('logs', logs)
|
2023-03-17 04:55:02 +08:00
|
|
|
|
2023-04-17 02:36:04 +08:00
|
|
|
// // 登录
|
|
|
|
// wx.login({
|
|
|
|
// success: res => {
|
|
|
|
// // 发送 res.code 到后台换取 openId, sessionKey, unionId
|
|
|
|
// }
|
|
|
|
// })
|
2023-03-17 04:55:02 +08:00
|
|
|
},
|
|
|
|
globalData: {
|
2023-04-17 02:36:04 +08:00
|
|
|
// debugMode: true, // 是否展示调试内容
|
2023-03-17 04:55:02 +08:00
|
|
|
baseUrl: true ? // Api 请求域名 不带最后的 /
|
|
|
|
"https://epp.only4.work" :
|
|
|
|
"http://localhost",
|
|
|
|
userInfo: null
|
|
|
|
}
|
|
|
|
})
|