This commit is contained in:
2023-10-26 14:30:34 +07:00
parent b98c2051e9
commit 136c9a2f6d
2 changed files with 4 additions and 6 deletions

View File

@@ -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);

View File

@@ -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 { }