edit
This commit is contained in:
		| @ -12,7 +12,7 @@ import { cacheConf } from '@conf/cache.conf'; | ||||
| import { eventConf } from '@conf/event.conf'; | ||||
| import { sysConf } from '@conf/sys.conf'; | ||||
| import { DA_SERVICE_TOKEN, ITokenService } from '@delon/auth'; | ||||
| import { SettingsService } from '@delon/theme'; | ||||
| import { MenuService, SettingsService } from '@delon/theme'; | ||||
| import { Observable } from 'rxjs'; | ||||
| import { map } from 'rxjs/operators'; | ||||
| import { BaseService } from '../core/base.service'; | ||||
| @ -73,6 +73,7 @@ export class EAUserService extends BaseService { | ||||
|     public cacheSrv: EACacheService, | ||||
|     public eventSrv: EAEventService, | ||||
|     public settings: SettingsService, | ||||
|     private menuService: MenuService, | ||||
|     public router: Router, | ||||
|     public ar: ActivatedRoute, | ||||
|     @Inject(DA_SERVICE_TOKEN) public tokenSrv: ITokenService, | ||||
| @ -143,14 +144,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); | ||||
|     // }); | ||||
|     this.request('assets/mocks/menu-data.json').pipe( | ||||
|       map((res: any) => { | ||||
|     return this.asyncRequest('assets/mocks/menu-data.json', {}, 'GET').then(res => { | ||||
|         this.cacheSrv.set(cacheConf.menu, res.menu); | ||||
|       }) | ||||
|     ); | ||||
|         this.menuService.add(res.menu); | ||||
|     }); | ||||
|     // this.request('assets/mocks/menu-data.json', {}, 'GET').subscribe((res: any) => { | ||||
|     //   this.cacheSrv.set(cacheConf.menu, res.menu); | ||||
|     //   this.menuService.add(res.menu); | ||||
|     // }); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|  | ||||
		Reference in New Issue
	
	Block a user