This commit is contained in:
Taric Xin
2022-01-04 18:00:50 +08:00
parent 94536ab262
commit ae2bde8d33
8 changed files with 267 additions and 74 deletions

View File

@ -62,7 +62,7 @@ export class BusinessInterceptor implements HttpInterceptor {
const header: any = {
appId: this.envSrv.env.appId,
tenantId: this.envSrv.env.tenantId,
enterpriseId: '0',
enterpriseId: this.envSrv.env.enterpriseId,
...position
};

View File

@ -1,8 +1,10 @@
import { HttpClient } from '@angular/common/http';
import { Inject, Injectable } from '@angular/core';
import { cacheConf } from '@conf/cache.conf';
import { sysConf } from '@conf/sys.conf';
import { ACLService } from '@delon/acl';
import { MenuService, SettingsService, TitleService, _HttpClient } from '@delon/theme';
import { AmapService, EAUserService } from '@shared';
import { AmapService, EACacheService, EAUserService } from '@shared';
import { NzSafeAny } from 'ng-zorro-antd/core/types';
import { NzIconService } from 'ng-zorro-antd/icon';
import { Observable, zip } from 'rxjs';
@ -27,6 +29,7 @@ export class StartupService {
private httpClient: _HttpClient,
private userSrv: EAUserService,
private amapService: AmapService,
public cacheSrv: EACacheService,
private coreSrv: CoreService
) {
iconSrv.addIcon(...ICONS_AUTO, ...ICONS);
@ -83,6 +86,11 @@ export class StartupService {
this.settingService.setApp(appData);
// 用户信息:包括姓名、头像、邮箱地址
this.settingService.setUser(userData);
this.cacheSrv.set(cacheConf.env, {
appId: sysConf.appId,
tenantId: userData?.tenantId || sysConf.tenantId,
enterpriseId: userData?.enterpriseId || sysConf.enterpriseId
});
// ACL设置权限为全量
this.aclService.setFull(true);
// 初始化菜单