refactoring

This commit is contained in:
leejinho 2019-12-17 13:00:33 +09:00
parent fcfb03e9f9
commit d5bdbd2cd7
4 changed files with 34 additions and 10 deletions

View File

@ -7,6 +7,7 @@
<div *ngIf="!!loginRes" class="app-layout-native-title-bar-link">
<button
mat-icon-button
*ngIf="weblink.length > 0"
class="button app-layout-native-title-bar-logout"
matTooltip="웹링크"
(click)="onToggleWebLinkSelector()"

View File

@ -46,7 +46,6 @@ export class TopBarComponent implements OnInit, OnDestroy {
loginRes: LoginResponse;
loginResSubscription: Subscription;
appUserInfo: AppUserInfo;
updateInfo$: Observable<UpdateInfo>;
@ -62,12 +61,7 @@ export class TopBarComponent implements OnInit, OnDestroy {
private localStorageService: LocalStorageService,
private sessionStorageService: SessionStorageService,
private daesangApiService: DaesangApiService
) {
this.appUserInfo = this.localStorageService.encGet<AppUserInfo>(
KEY_APP_USER_INFO,
environment.customConfig.appKey
);
}
) {}
ngOnInit() {
this.windowStateChanged$ = this.nativeService.windowStateChanged();
@ -127,8 +121,13 @@ export class TopBarComponent implements OnInit, OnDestroy {
weblink => weblink.key === 'WebLinkMailCnt'
);
if (link.length > 0) {
const appUserInfo = this.localStorageService.encGet<AppUserInfo>(
KEY_APP_USER_INFO,
environment.customConfig.appKey
);
const WebLinkMailCnt = link[0];
const loginPw = this.appUserInfo.loginPw;
const loginPw = appUserInfo.loginPw;
const loginPw2 = this.loginInfo.loginPw;
const loginId = this.loginInfo.loginId;
const token = loginRes.tokenString;
@ -157,9 +156,14 @@ export class TopBarComponent implements OnInit, OnDestroy {
weblink => weblink.key === 'WebLinkPaymentCnt'
);
if (link.length > 0) {
const appUserInfo = this.localStorageService.encGet<AppUserInfo>(
KEY_APP_USER_INFO,
environment.customConfig.appKey
);
const WebLinkPaymentCnt = link[0];
const WebLinkMailCnt = link[0];
const loginPw = this.appUserInfo.loginPw;
const loginPw = appUserInfo.loginPw;
const loginPw2 = this.loginInfo.loginPw;
const loginId = this.loginInfo.loginId;
const token = loginRes.tokenString;
@ -222,7 +226,12 @@ export class TopBarComponent implements OnInit, OnDestroy {
this.showWeblink = !this.showWeblink;
}
onClickWebLink(link: WebLink): void {
const loginPw = this.appUserInfo.loginPw;
const appUserInfo = this.localStorageService.encGet<AppUserInfo>(
KEY_APP_USER_INFO,
environment.customConfig.appKey
);
const loginPw = appUserInfo.loginPw;
const loginPw2 = this.loginInfo.loginPw;
const loginId = this.loginInfo.loginId;
const token = this.loginRes.tokenString;

View File

@ -52,6 +52,13 @@ export const environment: Environment = {
}
},
customConfig: {
appKey: '!@#$DAESANG%^&*',
/** 삭제,수정 불가 그룹 Seqs:number[] */
fixedGroupSeqs: []
},
commonApiModuleConfig: {
hostConfig: {
protocol: 'http',

View File

@ -52,6 +52,13 @@ export const environment: Environment = {
}
},
customConfig: {
appKey: '!@#$DAESANG%^&*',
/** 삭제,수정 불가 그룹 Seqs:number[] */
fixedGroupSeqs: []
},
commonApiModuleConfig: {
hostConfig: {
protocol: 'http',