登录跳转
This commit is contained in:
@@ -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
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user