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