From 67b04ef8509ea4b1edb6c647d22a27d39ead7e00 Mon Sep 17 00:00:00 2001 From: leejinho Date: Tue, 24 Mar 2020 10:00:50 +0900 Subject: [PATCH] =?UTF-8?q?bugfix=20::=20=EB=A9=94=EC=9D=BC=20=EC=B9=B4?= =?UTF-8?q?=EC=9A=B4=ED=8A=B8=20URL=20=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0?= =?UTF-8?q?=EC=97=90=20'+'=20=EA=B0=92=EC=9D=B4=20=EC=9C=A0=EC=9E=85?= =?UTF-8?q?=EB=90=A0=20=EA=B2=BD=EC=9A=B0=EC=97=90=20=EB=8C=80=ED=95=9C=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../profile/profile.dialog.component.ts | 5 ++++- .../native/components/top-bar.component.ts | 21 +++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts index 333ef40e..9072f145 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts @@ -543,7 +543,10 @@ export class ProfileDialogComponent implements OnInit, OnDestroy { ); let elephantUrl = links[0].url - .replace(/(\(%USER_PASS%\))/g, appUserInfo.loginPw) // exchange USER_PASS params + .replace( + /(\(%USER_PASS%\))/g, + encodeURIComponent(appUserInfo.loginPw) + ) // exchange USER_PASS params .replace('kind%3D3', 'kind%3D2'); // change value of 'kind' elephantUrl += '%26empno%3D' + this.userInfo.employeeNum + ','; // add parameter of 'empno' diff --git a/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts index 8829f193..9b72055b 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts @@ -258,9 +258,9 @@ export class TopBarComponent implements OnInit, OnDestroy { ); const WebLinkMailCnt = link[0]; - const loginPw = appUserInfo.loginPw; + const loginPw = encodeURIComponent(appUserInfo.loginPw); const loginPw2 = this.loginInfo.loginPw; - const loginId = this.loginInfo.loginId; + const loginId = encodeURIComponent(this.loginInfo.loginId); const token = loginRes.tokenString; const url = WebLinkMailCnt.url @@ -268,6 +268,15 @@ export class TopBarComponent implements OnInit, OnDestroy { .replace(/(\(%USER_ID%\))/g, loginId) .replace(/(\(%USER_PASS%\))/g, loginPw); + this.daesangApiService + .retrieveMailCount(url) + .pipe( + take(1), + map(res => (this.webLinkBadgeMail = res.count)), + catchError(error => of(this.logger.log(error))) + ) + .subscribe(); + // interval if (!this.webLinkbadgeEmailCountInterval) { this.webLinkbadgeEmailCountInterval = setInterval(() => { this.daesangApiService @@ -294,9 +303,9 @@ export class TopBarComponent implements OnInit, OnDestroy { ); const WebLinkPaymentCnt = link[0]; - const loginPw = appUserInfo.loginPw; + const loginPw = encodeURIComponent(appUserInfo.loginPw); const loginPw2 = this.loginInfo.loginPw; - const loginId = this.loginInfo.loginId; + const loginId = encodeURIComponent(this.loginInfo.loginId); const token = loginRes.tokenString; const url = WebLinkPaymentCnt.url @@ -422,9 +431,9 @@ export class TopBarComponent implements OnInit, OnDestroy { environment.customConfig.appKey ); - const loginPw = appUserInfo.loginPw; + const loginPw = encodeURIComponent(appUserInfo.loginPw); const loginPw2 = this.loginInfo.loginPw; - const loginId = this.loginInfo.loginId; + const loginId = encodeURIComponent(this.loginInfo.loginId); const token = this.loginRes.tokenString; const erpPw = this.daesangCipherService.encryptForSapErp( 'aes256-daesang-key!!',