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 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);
|
||||
}
|
||||
|
||||
@ -1,46 +1,25 @@
|
||||
@import '~@delon/theme/index';
|
||||
@import '../../../../less/edit.less';
|
||||
|
||||
:host {
|
||||
::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 {
|
||||
display: flex;
|
||||
display : flex;
|
||||
font-size: 16px;
|
||||
|
||||
.enterprise-name {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
margin-right: 15px;
|
||||
width : 64px;
|
||||
height : 64px;
|
||||
margin-right : 15px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.user-info-des {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"menu": [
|
||||
{
|
||||
"text": "样例",
|
||||
@ -381,4 +383,5 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user