웹링크 브라우저 연동 처리.
This commit is contained in:
parent
f3513e0f9a
commit
97c90ff06d
|
@ -234,7 +234,7 @@
|
|||
<div class="container">
|
||||
<div class="img-item">
|
||||
<ul>
|
||||
<li *ngFor="let link of weblink">
|
||||
<li *ngFor="let link of weblink" (click)="onClickWebLink(link)">
|
||||
<div class="icon" [matTooltip]="link.title">
|
||||
<span class="mdi mdi-star-circle-outline mdi-48px"></span>
|
||||
</div>
|
||||
|
|
|
@ -16,7 +16,17 @@ import * as UpdateStore from '@app/store/setting/update';
|
|||
|
||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||
import { tap } from 'rxjs/operators';
|
||||
import { RightDrawer } from '@app/types';
|
||||
import {
|
||||
RightDrawer,
|
||||
KEY_URL_INFO,
|
||||
LoginInfo,
|
||||
KEY_LOGIN_INFO
|
||||
} from '@app/types';
|
||||
import {
|
||||
WebLink,
|
||||
DaesangUrlInfoResponse
|
||||
} from '@ucap-webmessenger/api-external';
|
||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||
|
||||
@Component({
|
||||
selector: 'app-layout-native-top-bar',
|
||||
|
@ -33,124 +43,27 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||
updateInfo$: Observable<UpdateInfo>;
|
||||
|
||||
showWeblink = false;
|
||||
weblink: {
|
||||
title: string;
|
||||
url: string;
|
||||
order: number;
|
||||
activeYn: boolean;
|
||||
}[] = [
|
||||
{
|
||||
order: 0,
|
||||
title: '웹하드',
|
||||
activeYn: true,
|
||||
url:
|
||||
'http://sso.daesang.com/messenger.do?eMateApps=WHD_78&eMatePTK=(%USER_ID%)'
|
||||
},
|
||||
{
|
||||
order: 0,
|
||||
title: 'DSP',
|
||||
activeYn: true,
|
||||
url:
|
||||
'http://sso.daesang.com/messenger.do?eMateApps=GWS_01&eMatePTK=(%USER_ID%)'
|
||||
},
|
||||
{
|
||||
order: 0,
|
||||
title: 'SMS',
|
||||
activeYn: true,
|
||||
url:
|
||||
'http://sso.daesang.com/messenger.do?eMateApps=SMS_21&eMatePTK=(%USER_ID%)'
|
||||
},
|
||||
{
|
||||
order: 0,
|
||||
title: '화상회의',
|
||||
activeYn: true,
|
||||
url:
|
||||
'http://dsview.daesang.com/plugin/sso_login.asp?userid=(%USER_FIELD4%)'
|
||||
},
|
||||
{
|
||||
order: 0,
|
||||
title: 'EP',
|
||||
activeYn: true,
|
||||
url:
|
||||
'http://sso.daesang.com/messenger.do?eMateApps=EPS_07&eMatePTK=(%USER_ID%)'
|
||||
},
|
||||
{
|
||||
order: 0,
|
||||
title: 'S & OP회의',
|
||||
activeYn: true,
|
||||
url:
|
||||
'http://sso.daesang.com/messenger.do?eMateApps=SOP_05&eMatePTK=(%USER_ID%)'
|
||||
},
|
||||
{
|
||||
order: 0,
|
||||
title: 'S & OM회의',
|
||||
activeYn: true,
|
||||
url:
|
||||
'http://sso.daesang.com/messenger.do?eMateApps=SOM_09&eMatePTK=(%USER_ID%)'
|
||||
},
|
||||
{
|
||||
order: 0,
|
||||
title: '코끼리',
|
||||
activeYn: true,
|
||||
url:
|
||||
'http://dsp.daesang.com/names.nsf?login&username=(%USER_ID%)&password=(%USER_PASS%)&RedirectTo=http%3A%2F%2Fdsp%2Edaesang%2Ecom%3A80%2FDS%5F10%2Femate%5Fapp%2Felephant%2Fmaster%2Ensf%2Fmain%2Ehtml%3Freadform%26kind%3D3'
|
||||
},
|
||||
{
|
||||
order: 0,
|
||||
title: 'IT서비스데스크',
|
||||
activeYn: true,
|
||||
url:
|
||||
'http://sso.daesang.com/messenger.do?eMateApps=HPD_13&eMatePTK=(%USER_ID%)'
|
||||
},
|
||||
{
|
||||
order: 0,
|
||||
title: '개인속보',
|
||||
activeYn: true,
|
||||
url:
|
||||
'http://sso.daesang.com/messenger.do?eMateApps=DSB_43&eMatePTK=(%USER_ID%)'
|
||||
},
|
||||
|
||||
{
|
||||
order: 0,
|
||||
title: '메일 count url',
|
||||
activeYn: true,
|
||||
url:
|
||||
'http://dsp.daesang.com/names.nsf?login&username=(%USER_ID%)&password=(%USER_PASS%)&RedirectTo=http://dsp.daesang.com/common/sysorg.nsf/unreadmailcount2?openagent%26empno=(%USER_FIELD4%)'
|
||||
},
|
||||
{
|
||||
order: 0,
|
||||
title: '메일 link url',
|
||||
activeYn: true,
|
||||
url:
|
||||
'http://dsp.daesang.com/names.nsf?login&username=(%USER_ID%)&password=(%USER_PASS%)&RedirectTo=%2Fportal%2Ensf%2Fmailredirect%3Fopenpage%26mode%3Dm'
|
||||
},
|
||||
{
|
||||
order: 0,
|
||||
title: '결제 count url',
|
||||
activeYn: true,
|
||||
url:
|
||||
'http://dsp.daesang.com/names.nsf?login&username=(%USER_ID%)&password=(%USER_PASS%)&RedirectTo=http://dsp.daesang.com/common/sysorg.nsf/unreadmailcount2?openagent%26empno=(%USER_FIELD4%)'
|
||||
},
|
||||
{
|
||||
order: 0,
|
||||
title: '결제 link url',
|
||||
activeYn: true,
|
||||
url:
|
||||
'http://dsp.daesang.com/names.nsf?login&username=(%USER_ID%)&password=(%USER_PASS%)&RedirectTo=%2Fportal%2Ensf%2Fmailredirect%3Fopenpage%26mode%3Dm'
|
||||
},
|
||||
|
||||
{
|
||||
order: 0,
|
||||
title: '3개월 비밀번호 변경창 url',
|
||||
activeYn: true,
|
||||
url: 'sso.daesang.com / modify.do'
|
||||
}
|
||||
];
|
||||
loginInfo: LoginInfo;
|
||||
weblink: WebLink[] = [];
|
||||
|
||||
constructor(
|
||||
private store: Store<any>,
|
||||
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService
|
||||
) {}
|
||||
@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();
|
||||
|
@ -202,6 +115,14 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||
onToggleWebLinkSelector(): void {
|
||||
this.showWeblink = !this.showWeblink;
|
||||
}
|
||||
onClickWebLink(link: WebLink): void {
|
||||
const loginPw = this.loginInfo.loginPw;
|
||||
const token = this.loginRes.tokenString;
|
||||
|
||||
const url = link.url.replace('(%USER_TOKEN%)', token);
|
||||
|
||||
this.nativeService.openDefaultBrowser(url);
|
||||
}
|
||||
|
||||
onClickUpdate() {
|
||||
this.store.dispatch(UpdateStore.applyInstantUpdate());
|
||||
|
|
|
@ -111,7 +111,7 @@ export class AppMessengerResolver implements Resolve<void> {
|
|||
switchMap(res => {
|
||||
return this.protocolService.connect(res.serverIp);
|
||||
}),
|
||||
switchMap(res => {
|
||||
switchMap(() => {
|
||||
return this.externalApiService
|
||||
.urlInfoDaesang({
|
||||
deviceType: environmentsInfo.deviceType,
|
||||
|
|
Loading…
Reference in New Issue
Block a user