登录跳转

This commit is contained in:
2025-01-09 09:21:27 +08:00
parent 3fbb6609e3
commit 369cb0dc77
2 changed files with 17 additions and 1 deletions

View File

@@ -343,4 +343,16 @@ export const sysMenuBuild = () => {
}
]
return res
}
export const authlogin = () => {
let res = {
code: '1',
result: {
user: {
username: 'admin',
user: {isAdmin: true}
}
}
}
return res
}

View File

@@ -158,7 +158,11 @@ export default {
this.$store.dispatch('userInfo', JSON.stringify(obj))
this.$store.dispatch('setLoginInfo', {username: this.username, password: this.password})
this.hide()
this.$router.push('/mini/home')
if (res.result.user.user.isAdmin) {
this.$router.push('/mini/home')
} else {
this.$router.push('/index/home')
}
} else {
this.Dialog(res.desc)
}