edit
This commit is contained in:
		| @ -99,7 +99,7 @@ export class StartupService { | |||||||
|     const userData = this.httpClient.post(this.userSrv.$api_get_user_by_token,{}).pipe(map((res: any) => res.data)); |     const userData = this.httpClient.post(this.userSrv.$api_get_user_by_token,{}).pipe(map((res: any) => res.data)); | ||||||
|  |  | ||||||
|     // 菜单数据 |     // 菜单数据 | ||||||
|     const menuData = this.httpClient.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.menu)); |     const menuData = this.httpClient.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.data.menu)); | ||||||
|  |  | ||||||
|     return zip(appData, userData, menuData); |     return zip(appData, userData, menuData); | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -1,46 +1,25 @@ | |||||||
| @import '~@delon/theme/index'; | @import '../../../../less/edit.less'; | ||||||
|  |  | ||||||
| :host { | :host { | ||||||
|   ::ng-deep { |   ::ng-deep { | ||||||
|     .ant-steps-dot { |  | ||||||
|       .ant-steps-item-content { |  | ||||||
|         width: 200px; |  | ||||||
|       } |  | ||||||
|       .ant-steps-item-icon { |  | ||||||
|         margin-left: 96px; |  | ||||||
|       } |  | ||||||
|       .ant-steps-item-tail::after { |  | ||||||
|         margin-left: 40px; |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|     .success { |  | ||||||
|       color: @success-color; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     .warning { |  | ||||||
|       color: @warning-color; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     .error { |  | ||||||
|       color: @error-color; |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
|   .mt16 { |  | ||||||
|     margin-top: 16px; |  | ||||||
|   } |  | ||||||
|     .user-info { |     .user-info { | ||||||
|       display  : flex; |       display  : flex; | ||||||
|       font-size: 16px; |       font-size: 16px; | ||||||
|  |  | ||||||
|       .enterprise-name { |       .enterprise-name { | ||||||
|         margin-right: 15px; |         margin-right: 15px; | ||||||
|       } |       } | ||||||
|  |  | ||||||
|       img { |       img { | ||||||
|         width        : 64px; |         width        : 64px; | ||||||
|         height       : 64px; |         height       : 64px; | ||||||
|         margin-right : 15px; |         margin-right : 15px; | ||||||
|         border-radius: 50%; |         border-radius: 50%; | ||||||
|       } |       } | ||||||
|  |  | ||||||
|       .user-info-des { |       .user-info-des { | ||||||
|         margin-bottom: 5px; |         margin-bottom: 5px; | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  | } | ||||||
| @ -12,7 +12,7 @@ import { cacheConf } from '@conf/cache.conf'; | |||||||
| import { eventConf } from '@conf/event.conf'; | import { eventConf } from '@conf/event.conf'; | ||||||
| import { sysConf } from '@conf/sys.conf'; | import { sysConf } from '@conf/sys.conf'; | ||||||
| import { DA_SERVICE_TOKEN, ITokenService } from '@delon/auth'; | import { DA_SERVICE_TOKEN, ITokenService } from '@delon/auth'; | ||||||
| import { SettingsService } from '@delon/theme'; | import { MenuService, SettingsService } from '@delon/theme'; | ||||||
| import { Observable } from 'rxjs'; | import { Observable } from 'rxjs'; | ||||||
| import { map } from 'rxjs/operators'; | import { map } from 'rxjs/operators'; | ||||||
| import { BaseService } from '../core/base.service'; | import { BaseService } from '../core/base.service'; | ||||||
| @ -73,6 +73,7 @@ export class EAUserService extends BaseService { | |||||||
|     public cacheSrv: EACacheService, |     public cacheSrv: EACacheService, | ||||||
|     public eventSrv: EAEventService, |     public eventSrv: EAEventService, | ||||||
|     public settings: SettingsService, |     public settings: SettingsService, | ||||||
|  |     private menuService: MenuService, | ||||||
|     public router: Router, |     public router: Router, | ||||||
|     public ar: ActivatedRoute, |     public ar: ActivatedRoute, | ||||||
|     @Inject(DA_SERVICE_TOKEN) public tokenSrv: ITokenService, |     @Inject(DA_SERVICE_TOKEN) public tokenSrv: ITokenService, | ||||||
| @ -143,14 +144,14 @@ export class EAUserService extends BaseService { | |||||||
|    * 加载用户菜单 |    * 加载用户菜单 | ||||||
|    */ |    */ | ||||||
|   async loadUserMenus() { |   async loadUserMenus() { | ||||||
|     // return this.asyncRequest(this.$api_get_user_menus, { appId: sysConf.appId }).then(res => { |     return this.asyncRequest('assets/mocks/menu-data.json', {}, 'GET').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); |         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); | ||||||
|  |     // }); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|  | |||||||
| @ -1,4 +1,6 @@ | |||||||
| { | { | ||||||
|  |   "success": true, | ||||||
|  |   "data": { | ||||||
|     "menu": [ |     "menu": [ | ||||||
|       { |       { | ||||||
|         "text": "样例", |         "text": "样例", | ||||||
| @ -382,3 +384,4 @@ | |||||||
|       } |       } | ||||||
|     ] |     ] | ||||||
|   } |   } | ||||||
|  | } | ||||||
		Reference in New Issue
	
	Block a user