웹링크 버그 수정.
This commit is contained in:
parent
97c90ff06d
commit
43f071319e
|
@ -50,20 +50,7 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||
private store: Store<any>,
|
||||
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
||||
private sessionStorageService: SessionStorageService
|
||||
) {
|
||||
this.loginInfo = this.sessionStorageService.get<LoginInfo>(KEY_LOGIN_INFO);
|
||||
const urlInfo: DaesangUrlInfoResponse = this.sessionStorageService.get<
|
||||
DaesangUrlInfoResponse
|
||||
>(KEY_URL_INFO);
|
||||
|
||||
if (!!urlInfo.webLink) {
|
||||
this.weblink = urlInfo.webLink.filter(
|
||||
weblink =>
|
||||
urlInfo.webLinkAllowedList.filter(type => type === weblink.key)
|
||||
.length > 0
|
||||
);
|
||||
}
|
||||
}
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.windowStateChanged$ = this.nativeService.windowStateChanged();
|
||||
|
@ -73,6 +60,13 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||
select(AppStore.AccountSelector.AuthenticationSelector.loginRes),
|
||||
tap(loginRes => {
|
||||
this.loginRes = loginRes;
|
||||
|
||||
this.loginInfo = this.sessionStorageService.get<LoginInfo>(
|
||||
KEY_LOGIN_INFO
|
||||
);
|
||||
|
||||
// WebLink init..
|
||||
this.initWebLink();
|
||||
})
|
||||
)
|
||||
.subscribe();
|
||||
|
@ -82,6 +76,47 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||
);
|
||||
}
|
||||
|
||||
initWebLink(): void {
|
||||
const urlInfo: DaesangUrlInfoResponse = this.sessionStorageService.get<
|
||||
DaesangUrlInfoResponse
|
||||
>(KEY_URL_INFO);
|
||||
|
||||
if (!!urlInfo && !!urlInfo.webLink) {
|
||||
this.weblink = urlInfo.webLink.filter(
|
||||
weblink =>
|
||||
urlInfo.webLinkAllowedList.filter(type => type === weblink.key)
|
||||
.length > 0
|
||||
);
|
||||
|
||||
if (
|
||||
urlInfo.webLinkAllowedList.indexOf('WebLinkMail') > -1 &&
|
||||
urlInfo.webLinkAllowedList.indexOf('WebLinkMailCnt') > -1
|
||||
) {
|
||||
// 메일 카운트 체크.
|
||||
const link = urlInfo.webLink.filter(
|
||||
weblink => weblink.key === 'WebLinkMailCnt'
|
||||
);
|
||||
if (link.length > 0) {
|
||||
const WebLinkMailCnt = link[0];
|
||||
// this.onClickWebLink(WebLinkMailCnt);
|
||||
}
|
||||
}
|
||||
if (
|
||||
urlInfo.webLinkAllowedList.indexOf('WebLinkPayment') > -1 &&
|
||||
urlInfo.webLinkAllowedList.indexOf('WebLinkPaymentCnt') > -1
|
||||
) {
|
||||
// 결제 카운트 체크.
|
||||
const link = urlInfo.webLink.filter(
|
||||
weblink => weblink.key === 'WebLinkPaymentCnt'
|
||||
);
|
||||
if (link.length > 0) {
|
||||
const WebLinkPaymentCnt = link[0];
|
||||
// this.onClickWebLink(WebLinkPaymentCnt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {}
|
||||
|
||||
onClickClose() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user