fix: 修复登录跳转路径和版本号更新

refactor: 移除调试日志和冗余代码
style: 格式化代码和修复条件判断逻辑
feat: 重新启用401错误处理并优化表单重置逻辑
This commit is contained in:
砂糖
2025-11-04 14:27:20 +08:00
parent 196f55961a
commit 9fcbad1f8e
7 changed files with 50 additions and 80 deletions

View File

@@ -41,13 +41,13 @@ const request = config => {
const code = res.data.code || 200
const msg = errorCode[code] || res.data.msg || errorCode['default']
if (code === 401) {
// showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
// if (res.confirm) {
// store.dispatch('LogOut').then(res => {
// uni.reLaunch({ url: '/pages/login' })
// })
// }
// })
showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
if (res.confirm) {
store.dispatch('LogOut').then(res => {
uni.reLaunch({ url: '/pages/login' })
})
}
})
reject('无效的会话,或者会话已过期,请重新登录。')
} else if (code === 500) {
toast(msg)