edit
This commit is contained in:
@ -32,7 +32,7 @@ export class MenuManagerComponentsIndexComponent implements OnInit {
|
||||
{ name: '运营后台', appId: this.envSrv.env.appId, enName: 'tms-obc-web' }
|
||||
];
|
||||
this.selectedPlatform = this.platforms[0];
|
||||
this.platformChange(this.selectedPlatform);
|
||||
// this.platformChange(this.selectedPlatform);
|
||||
}
|
||||
|
||||
platformChange(e: { name: string; appId: string }) {
|
||||
@ -45,7 +45,7 @@ export class MenuManagerComponentsIndexComponent implements OnInit {
|
||||
}
|
||||
|
||||
loadMenus(appId: string) {
|
||||
this.service.request(this.service.$api_get_one, { appId },'POST',false).subscribe(res => {
|
||||
this.service.request(this.service.$api_get_one, { appId }, 'POST', false).subscribe(res => {
|
||||
console.log(res);
|
||||
|
||||
this.menus = res;
|
||||
@ -56,12 +56,15 @@ export class MenuManagerComponentsIndexComponent implements OnInit {
|
||||
console.log('editChanged', event);
|
||||
}
|
||||
|
||||
menuImport() {
|
||||
menuImport(index: number) {
|
||||
this.selectedPlatform = this.platforms[index];
|
||||
if (!this.selectedPlatform) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.service.http.request('GET', `assets/mocks/platform/${this.selectedPlatform.enName}.json`).subscribe((res: any) => {
|
||||
console.log(res);
|
||||
|
||||
this.addMenu(res.menu);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user