切换公司2
This commit is contained in:
parent
b89a685ffb
commit
3d95f8635d
|
|
@ -48,7 +48,7 @@ export default {
|
||||||
return USER_MODEL == "AdminUser";
|
return USER_MODEL == "AdminUser";
|
||||||
},
|
},
|
||||||
|
|
||||||
afterLoginSuccess({ token, access_expire, uid, msg = '登录成功',pushTo = '/dashboard/workplace' }) {
|
afterLoginSuccess({ closeOthers, token, access_expire, uid, msg = '登录成功', pushTo = '/dashboard/workplace' }) {
|
||||||
|
|
||||||
setAuthorization({ token: token, expireAt: new Date(access_expire * 1000) }) // 设置token
|
setAuthorization({ token: token, expireAt: new Date(access_expire * 1000) }) // 设置token
|
||||||
|
|
||||||
|
|
@ -74,8 +74,13 @@ export default {
|
||||||
const routesConfig = result.data.data
|
const routesConfig = result.data.data
|
||||||
this.setRoutesConfig(routesConfig)
|
this.setRoutesConfig(routesConfig)
|
||||||
loadRoutes([routesConfig])
|
loadRoutes([routesConfig])
|
||||||
//this.$router.push(pushTo)
|
|
||||||
|
if (closeOthers) {
|
||||||
this.$closeOthers(pushTo)
|
this.$closeOthers(pushTo)
|
||||||
|
} else {
|
||||||
|
this.$router.push(pushTo)
|
||||||
|
}
|
||||||
|
|
||||||
this.$message.success(msg, 3)
|
this.$message.success(msg, 3)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue