登录跳转
This commit is contained in:
@@ -344,3 +344,15 @@ export const sysMenuBuild = () => {
|
|||||||
]
|
]
|
||||||
return res
|
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('userInfo', JSON.stringify(obj))
|
||||||
this.$store.dispatch('setLoginInfo', {username: this.username, password: this.password})
|
this.$store.dispatch('setLoginInfo', {username: this.username, password: this.password})
|
||||||
this.hide()
|
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 {
|
} else {
|
||||||
this.Dialog(res.desc)
|
this.Dialog(res.desc)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user