bug of logout is fixed

This commit is contained in:
병준 박 2019-11-28 13:19:19 +09:00
parent 5e7efb0a1e
commit 643fe7a7c1
3 changed files with 15 additions and 13 deletions

View File

@ -144,8 +144,6 @@ export class AppMessengerResolver implements Resolve<void> {
companyGroupCode: 'LG' companyGroupCode: 'LG'
}) })
); );
// this.store.dispatch(AuthenticationStore.postLogin({ loginRes }));
}), }),
withLatestFrom( withLatestFrom(
this.store.pipe( this.store.pipe(
@ -189,6 +187,7 @@ export class AppMessengerResolver implements Resolve<void> {
loginRes loginRes
}) })
); );
this.store.dispatch(AuthenticationStore.postLogin({ loginRes }));
resolve(); resolve();
}, },
err => { err => {

View File

@ -58,6 +58,7 @@ import {
LoginResponse LoginResponse
} from '@ucap-webmessenger/protocol-authentication'; } from '@ucap-webmessenger/protocol-authentication';
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type'; import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
import { ProtocolService } from '@ucap-webmessenger/protocol';
@Injectable() @Injectable()
export class Effects { export class Effects {
@ -128,13 +129,13 @@ export class Effects {
this.actions$.pipe( this.actions$.pipe(
ofType(loginRedirect), ofType(loginRedirect),
tap(authed => { tap(authed => {
this.ngZone.run(() => { // this.ngZone.run(() => {
// location.href = this.router.parseUrl('/account/login').toString(); // location.href = this.router.parseUrl('/account/login').toString();
this.router.navigate(['/account/login']).then(() => {
this.appAuthenticationService.logout(); this.appAuthenticationService.logout();
this.store.dispatch(logoutInitialize()); this.store.dispatch(logoutInitialize());
});
}); this.router.navigate(['/account/login']);
// });
}) })
), ),
{ dispatch: false } { dispatch: false }
@ -147,6 +148,7 @@ export class Effects {
switchMap(action => { switchMap(action => {
return this.authenticationProtocolService.logout({}).pipe( return this.authenticationProtocolService.logout({}).pipe(
map(res => { map(res => {
this.protocolService.disconnect();
this.store.dispatch(loginRedirect()); this.store.dispatch(loginRedirect());
}), }),
catchError(error => of(error)) catchError(error => of(error))
@ -218,8 +220,8 @@ export class Effects {
height: '500px', height: '500px',
disableClose: true, disableClose: true,
data: { data: {
title: '개인정보 동의' title: '개인정보 동의',
// html: `<iframe id="ifm_privacy" src="${privacyTotalUrl}" style="width: 100%;height: 300px;" />` html: `<iframe id="ifm_privacy" src="${privacyTotalUrl}" style="width: 100%;height: 300px;" />`
} }
}); });
@ -319,6 +321,7 @@ export class Effects {
private sessionStorageService: SessionStorageService, private sessionStorageService: SessionStorageService,
private piService: PiService, private piService: PiService,
private appAuthenticationService: AppAuthenticationService, private appAuthenticationService: AppAuthenticationService,
private protocolService: ProtocolService,
private authenticationProtocolService: AuthenticationProtocolService, private authenticationProtocolService: AuthenticationProtocolService,
private serviceProtocolService: ServiceProtocolService, private serviceProtocolService: ServiceProtocolService,
private dialogService: DialogService, private dialogService: DialogService,

View File

@ -155,7 +155,7 @@ export class Effects {
tap(() => { tap(() => {
groupList = []; groupList = [];
}), }),
switchMap(req => { exhaustMap(req => {
return this.syncProtocolService.group2(req).pipe( return this.syncProtocolService.group2(req).pipe(
map(res => { map(res => {
switch (res.SSVC_TYPE) { switch (res.SSVC_TYPE) {
@ -167,7 +167,7 @@ export class Effects {
case SSVC_TYPE_SYNC_GROUP_RES2: case SSVC_TYPE_SYNC_GROUP_RES2:
this.store.dispatch( this.store.dispatch(
group2Success({ group2Success({
groupList, groupList: [...groupList],
syncDate: (res as GroupResponse).syncDate syncDate: (res as GroupResponse).syncDate
}) })
); );