fix #82 后台登录成功但前端报错

This commit is contained in:
jxxghp
2024-03-05 20:21:05 +08:00
parent 058b32a263
commit ec7118b376

View File

@@ -78,7 +78,7 @@ function login() {
store.dispatch('auth/updateAvatar', avatar)
// 跳转到首页或回原始页面
router.push(store.state.auth.originalPath)
router.push(store.state.auth.originalPath ?? '/')
})
.catch((error: any) => {
// 登录失败,显示错误提示