|
|
@ -6,6 +6,7 @@ import {NzMessageService} from 'ng-zorro-antd'; |
|
|
|
import {Router} from '@angular/router'; |
|
|
|
import {Router} from '@angular/router'; |
|
|
|
import {IconService} from '../../services/icon.service'; |
|
|
|
import {IconService} from '../../services/icon.service'; |
|
|
|
import {RechargeService} from '../../services/recharge.service'; |
|
|
|
import {RechargeService} from '../../services/recharge.service'; |
|
|
|
|
|
|
|
import {CommonsService} from '../../services/commons.service'; |
|
|
|
|
|
|
|
|
|
|
|
@Component({ |
|
|
|
@Component({ |
|
|
|
selector: 'app-navigation', |
|
|
|
selector: 'app-navigation', |
|
|
@ -18,10 +19,12 @@ export class NavigationComponent implements OnInit { |
|
|
|
userInfo: any; |
|
|
|
userInfo: any; |
|
|
|
menuList: any; |
|
|
|
menuList: any; |
|
|
|
routeName: string; |
|
|
|
routeName: string; |
|
|
|
|
|
|
|
switchValue = false; |
|
|
|
constructor( |
|
|
|
constructor( |
|
|
|
private storage: LocalStorageService, |
|
|
|
private storage: LocalStorageService, |
|
|
|
private loginService: LoginService, |
|
|
|
private loginService: LoginService, |
|
|
|
private message: NzMessageService, |
|
|
|
private message: NzMessageService, |
|
|
|
|
|
|
|
private commonsService: CommonsService, |
|
|
|
private iconService: IconService, |
|
|
|
private iconService: IconService, |
|
|
|
private router: Router, |
|
|
|
private router: Router, |
|
|
|
) { } |
|
|
|
) { } |
|
|
@ -29,6 +32,9 @@ export class NavigationComponent implements OnInit { |
|
|
|
ngOnInit(): void { |
|
|
|
ngOnInit(): void { |
|
|
|
this.routeName = this.storage.get(ROUTENAME) == null ? 'index' : this.storage.get(ROUTENAME); |
|
|
|
this.routeName = this.storage.get(ROUTENAME) == null ? 'index' : this.storage.get(ROUTENAME); |
|
|
|
this.userInfo = this.storage.getList(ADMIN_INFO_OBJECT); |
|
|
|
this.userInfo = this.storage.getList(ADMIN_INFO_OBJECT); |
|
|
|
|
|
|
|
this.commonsService.mappingSysNameOl('RECHARGE', data => { |
|
|
|
|
|
|
|
this.switchValue = data['return_data'][0]['codeValue'] === '1'; |
|
|
|
|
|
|
|
}); |
|
|
|
this.menuList = this.storage.getList(ADMIN_INFO_OBJECT)['menuList']; // 定义菜单数据
|
|
|
|
this.menuList = this.storage.getList(ADMIN_INFO_OBJECT)['menuList']; // 定义菜单数据
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -62,4 +68,9 @@ export class NavigationComponent implements OnInit { |
|
|
|
history.back(); |
|
|
|
history.back(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clickSwitch(): void { |
|
|
|
|
|
|
|
this.switchValue = !this.switchValue; |
|
|
|
|
|
|
|
console.log(this.switchValue); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|