fetch(modify):修改bug
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m20s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m20s
This commit is contained in:
@@ -208,12 +208,26 @@ export function useLogin() {
|
||||
return
|
||||
}
|
||||
|
||||
// 保存权限、菜单和按钮
|
||||
if (response.data.permissions) {
|
||||
userStore.setPermissions(response.data.permissions)
|
||||
}
|
||||
if (response.data.menus) {
|
||||
userStore.setMenus(response.data.menus)
|
||||
}
|
||||
if (response.data.buttons) {
|
||||
userStore.setButtons(response.data.buttons)
|
||||
}
|
||||
|
||||
// 保存记住密码
|
||||
saveCredentials(formData.username, formData.password, formData.rememberPassword)
|
||||
|
||||
// 显示登录成功提示
|
||||
showLoginSuccessNotice()
|
||||
|
||||
// 等待数据持久化完成
|
||||
await new Promise((resolve) => setTimeout(resolve, 100))
|
||||
|
||||
// 跳转到重定向页面或首页
|
||||
const redirectPath = getRedirectPath(route)
|
||||
await router.push(redirectPath || HOME_PAGE)
|
||||
|
||||
Reference in New Issue
Block a user