|
|
|
@ -1,6 +1,14 @@ |
|
|
|
|
import {Component, OnInit} from '@angular/core'; |
|
|
|
|
import {LocalStorageService} from '../../services/local-storage.service'; |
|
|
|
|
import {DATA, ROUTENAME, MENUNAME, CHILDMENUNAME, INIT_FLAG, ADMIN_INFO_OBJECT, TOKEN} from '../../services/local-storage.namespace'; |
|
|
|
|
import { |
|
|
|
|
DATA, |
|
|
|
|
ROUTENAME, |
|
|
|
|
MENUNAME, |
|
|
|
|
CHILDMENUNAME, |
|
|
|
|
INIT_FLAG, |
|
|
|
|
ADMIN_INFO_OBJECT, |
|
|
|
|
TOKEN |
|
|
|
|
} from '../../services/local-storage.namespace'; |
|
|
|
|
import {LoginService} from '../../services/login.service'; |
|
|
|
|
import {NzMessageService, NzModalService} from 'ng-zorro-antd'; |
|
|
|
|
import {Router} from '@angular/router'; |
|
|
|
@ -12,11 +20,12 @@ import {Md5} from 'ts-md5'; |
|
|
|
|
import {environment} from '../../../environments/environment'; |
|
|
|
|
import {HttpClient} from '@angular/common/http'; |
|
|
|
|
import {CompanyTwoPwdService} from '../../services/company-two-pwd.service'; |
|
|
|
|
import {WebsocketService} from '../../services/websocket.service'; |
|
|
|
|
|
|
|
|
|
@Component({ |
|
|
|
|
selector: 'app-navigation', |
|
|
|
|
templateUrl: './navigation.component.html', |
|
|
|
|
styleUrls: ['./navigation.component.less'] |
|
|
|
|
styleUrls: ['./navigation.component.less'], |
|
|
|
|
}) |
|
|
|
|
export class NavigationComponent implements OnInit { |
|
|
|
|
|
|
|
|
@ -29,6 +38,7 @@ export class NavigationComponent implements OnInit { |
|
|
|
|
menuList: any; |
|
|
|
|
routeName: string; |
|
|
|
|
switchValue = false; |
|
|
|
|
|
|
|
|
|
constructor( |
|
|
|
|
private storage: LocalStorageService, |
|
|
|
|
private loginService: LoginService, |
|
|
|
@ -37,10 +47,13 @@ export class NavigationComponent implements OnInit { |
|
|
|
|
private companyTwoPwdService: CompanyTwoPwdService, |
|
|
|
|
private http: HttpClient, // http请求
|
|
|
|
|
private iconService: IconService, |
|
|
|
|
private webSocketService: WebsocketService, |
|
|
|
|
private store: LocalStorageService, // 数据请求
|
|
|
|
|
private modal: NzModalService, |
|
|
|
|
private fb: FormBuilder, // 表单
|
|
|
|
|
private router: Router, |
|
|
|
|
) { } |
|
|
|
|
) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
this.validateForm = this.fb.group({ |
|
|
|
@ -55,6 +68,10 @@ export class NavigationComponent implements OnInit { |
|
|
|
|
this.switchValue = data['return_data']['codeValue'] === '1'; |
|
|
|
|
}); |
|
|
|
|
this.menuList = this.storage.getList(ADMIN_INFO_OBJECT)['menuList']; // 定义菜单数据
|
|
|
|
|
|
|
|
|
|
// 连接websocket
|
|
|
|
|
// this.webSocketService.connect(`wss://hsgcs.dctpay.com/msg/WebSocket/` + this.store.get(ADMIN_INFO_OBJECT)['merchantStore'].id);
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public activeLi(routeName): void { |
|
|
|
@ -171,5 +188,4 @@ export class NavigationComponent implements OnInit { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|