优化:小程序记住登录与启动跳转
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
const { BRAND_CONFIG } = require('../../utils/config')
|
||||
|
||||
Page({
|
||||
data: {
|
||||
appName: BRAND_CONFIG.appName,
|
||||
message: '正在安全登录…'
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.startLogin()
|
||||
},
|
||||
|
||||
async startLogin() {
|
||||
try {
|
||||
await getApp().bootstrapWechatLogin()
|
||||
} catch (error) {
|
||||
this.setData({ message: '登录状态检查失败,正在返回登录页…' })
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user