完善小程序登录排班与个人资料流程

This commit is contained in:
2026-11-03 15:33:03 +08:00
parent 6aafbd4eac
commit 19e2cd2594
37 changed files with 779 additions and 195 deletions
@@ -1,5 +1,4 @@
const userApi = require('../../api/user')
const authApi = require('../../api/auth')
const auth = require('../../utils/auth')
const profileCache = require('../../utils/profile-cache')
@@ -185,13 +184,5 @@ Page({
}
},
async logout() {
const confirmed = await new Promise(resolve => wx.showModal({ title: '退出登录', content: '退出后将关闭自动登录,并清除本机提醒设置。', success: result => resolve(result.confirm), fail: () => resolve(false) }))
if (!confirmed) return
try { await authApi.logout() } catch (error) {}
getApp().logoutDevice()
wx.reLaunch({ url: '/pages/login/index' })
},
onUnload() { if (this.data.timer) clearInterval(this.data.timer) }
})