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