Commit 45c75373 by caoyanzhi

update: 登录逻辑处理

parent 73a5fcdd
......@@ -41,17 +41,16 @@ export default {
};
},
created() {
// 如果是登录页登页面,就不获取权限数据
if (whiteRoute.includes(toPath) || whiteRoute.includes(fromPath)) {
this.loading = false;
return;
} else {
this.getUserInfo().then(() => {
this.getUserInfo().then(() => {
// 如果是登录页登页面,就不获取权限数据
if (whiteRoute.includes(toPath) || whiteRoute.includes(fromPath)) {
this.loading = false;
} else {
Promise.all([this.getRight(), this.getMenuList()]).finally(() => {
setTimeout(() => (this.loading = false), 200);
});
});
}
}
});
},
methods: {
getUserInfo() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment