meun
This commit is contained in:
@ -12,7 +12,7 @@ export class DunHelper {
|
||||
userInfo;
|
||||
|
||||
constructor(private overlay: Overlay) {
|
||||
this.userInfo = JSON.parse(localStorage.getItem('user') || '');
|
||||
this.userInfo = JSON.parse(localStorage.getItem('user') || '{}');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -125,7 +125,7 @@ export class EAUserService extends BaseService {
|
||||
|
||||
async doAfterLogin() {
|
||||
await this.loadUserInfo();
|
||||
// await this.loadUserMenus();
|
||||
await this.loadUserMenus();
|
||||
await this.loadUserRoles();
|
||||
}
|
||||
|
||||
@ -143,9 +143,14 @@ export class EAUserService extends BaseService {
|
||||
* 加载用户菜单
|
||||
*/
|
||||
async loadUserMenus() {
|
||||
return this.asyncRequest(this.$api_get_user_menus, { appId: sysConf.appId }).then(res => {
|
||||
this.cacheSrv.set(cacheConf.menu, res);
|
||||
});
|
||||
// return this.asyncRequest(this.$api_get_user_menus, { appId: sysConf.appId }).then(res => {
|
||||
// this.cacheSrv.set(cacheConf.menu, res);
|
||||
// });
|
||||
this.request('assets/mocks/menu-data.json').pipe(
|
||||
map((res: any) => {
|
||||
this.cacheSrv.set(cacheConf.menu, res.menu);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user