[update]
This commit is contained in:
@@ -43,11 +43,9 @@ export class LoginComponent implements OnInit {
|
||||
async onSubmit(form: any) {
|
||||
if (!form.valid) return false;
|
||||
try {
|
||||
// const result = await lastValueFrom(this.authService.login(this.dataForm));
|
||||
const cathayResult = await lastValueFrom(this.cathayAuthService.login(this.cathayForm))
|
||||
// this.cathayAuthService.login(this.cathayForm).subscribe(res => console.log(res))
|
||||
console.log(cathayResult)
|
||||
this.appService.setAuth(cathayResult);
|
||||
const result = await lastValueFrom(this.authService.login(this.dataForm));
|
||||
// const cathayResult = await lastValueFrom(this.cathayAuthService.login(this.cathayForm))
|
||||
this.appService.setAuth(result);
|
||||
return this.router.navigate(['/pages']);
|
||||
} catch (err) {
|
||||
return this.appService.message(EAction.ERROR, EText.NO_DATA);
|
||||
|
||||
@@ -14,7 +14,7 @@ import { TokenIntercepterInterceptor } from './intercepter/token-intercepter.int
|
||||
HttpClientModule,
|
||||
],
|
||||
providers: [
|
||||
{ provide: HTTP_INTERCEPTORS, useClass: TokenIntercepterInterceptor, multi: true },
|
||||
// { provide: HTTP_INTERCEPTORS, useClass: TokenIntercepterInterceptor, multi: true },
|
||||
]
|
||||
})
|
||||
export class CoreModule { }
|
||||
|
||||
Reference in New Issue
Block a user