|
@@ -59,22 +59,20 @@
|
|
return this.userLoginDTO && this.userLoginDTO.type == '0' ? 'user' : 'admin';
|
|
return this.userLoginDTO && this.userLoginDTO.type == '0' ? 'user' : 'admin';
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- beforeRouteEnter (to, from, next) {
|
|
|
|
|
|
+ created () {
|
|
//获取菜单
|
|
//获取菜单
|
|
api.getAccessdMenu().then((res) => {
|
|
api.getAccessdMenu().then((res) => {
|
|
if (res.data.code == '0') {
|
|
if (res.data.code == '0') {
|
|
const data = res.data.data;
|
|
const data = res.data.data;
|
|
- next(vm=>{
|
|
|
|
- vm.ok = true;
|
|
|
|
|
|
+ this.ok = true;
|
|
const hasConcole=data.menuWrappers.findIndex((it)=>{
|
|
const hasConcole=data.menuWrappers.findIndex((it)=>{
|
|
return it.code == 'LT-KZT'
|
|
return it.code == 'LT-KZT'
|
|
});
|
|
});
|
|
- vm.hasConcole = hasConcole!=-1;
|
|
|
|
- vm.menuWrappers = data.menuWrappers;
|
|
|
|
- vm.organization = data.organization;
|
|
|
|
- vm.userLoginDTO = data.userLoginDTO;
|
|
|
|
- data.userLoginDTO && data.userLoginDTO.type == '0' && vm.getAuthStatus();
|
|
|
|
- })
|
|
|
|
|
|
+ this.hasConcole = hasConcole!=-1;
|
|
|
|
+ this.menuWrappers = data.menuWrappers;
|
|
|
|
+ this.organization = data.organization;
|
|
|
|
+ this.userLoginDTO = data.userLoginDTO;
|
|
|
|
+ data.userLoginDTO && data.userLoginDTO.type == '0' && this.getAuthStatus();
|
|
}
|
|
}
|
|
}).catch((error) => {
|
|
}).catch((error) => {
|
|
console.log(error);
|
|
console.log(error);
|