fix: 新用户第一次未设置角色无法登录 bug

This commit is contained in:
xingyu4j
2022-12-07 17:46:30 +08:00
parent c3560a52e2
commit cbeee0f744
2 changed files with 8 additions and 1 deletions

View File

@ -55,7 +55,7 @@ router.beforeEach(async (to, from, next) => {
const res = await listSimpleDictDataApi()
dictStore.setDictMap(res)
}
if (userStore.getRoles.length === 0) {
if (!userStore.getIsSetUser) {
isRelogin.show = true
const res = await getInfoApi()
await userStore.setUserInfoAction(res)