PI 로그인 시 파라미터 처리 수정.
This commit is contained in:
parent
a79eee3aff
commit
9bca5178b7
|
@ -1,8 +1,8 @@
|
||||||
import { Injectable, Inject } from '@angular/core';
|
import { Injectable, Inject } from '@angular/core';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient, HttpRequest, HttpResponse } from '@angular/common/http';
|
||||||
|
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { map } from 'rxjs/operators';
|
import { map, filter } from 'rxjs/operators';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Login2Request,
|
Login2Request,
|
||||||
|
@ -45,15 +45,22 @@ export class PiService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public login2(req: Login2Request): Observable<Login2Response> {
|
public login2(req: Login2Request): Observable<Login2Response> {
|
||||||
return this.httpClient
|
const httpReq = new HttpRequest(
|
||||||
.post<any>(
|
'POST',
|
||||||
this.urls.login2,
|
this.urls.login2,
|
||||||
{},
|
encodeLogin2(req),
|
||||||
{
|
{ reportProgress: true }
|
||||||
params: encodeLogin2(req)
|
);
|
||||||
|
|
||||||
|
return this.httpClient.request(httpReq).pipe(
|
||||||
|
filter(event => {
|
||||||
|
if (event instanceof HttpResponse) {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
)
|
return false;
|
||||||
.pipe(map(res => decodeLogin2(res)));
|
}),
|
||||||
|
map(res => decodeLogin2((res as HttpResponse<any>).body))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public userTermsAction(
|
public userTermsAction(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user