登录接口实现

This commit is contained in:
Taric Xin
2021-12-07 15:35:48 +08:00
parent 9167bb35f4
commit 4e0c3a3d03
14 changed files with 425 additions and 248 deletions

View File

@ -191,12 +191,14 @@ export class UserLoginComponent implements OnInit, OnDestroy {
// this.userSrv.loginByCaptcha(this.captchaSF.value.phone, this.captchaSF.value.smsCode, this.captchaSF.value.sc);
} else {
this.accountSF.validator({ emitError: true });
console.log(this.accountSF.value);
if (!this.accountSF.valid) {
return;
// this.userSrv.loginByAccount(this.accountSF.value.username, this.accountSF.value.password, this.accountSF.value.sc);
}
this.userSrv.loginByAccount(this.accountSF.value.username, this.accountSF.value.password);
}
this.router.navigateByUrl('/');
// this.router.navigateByUrl('/');
/* if (!this.accountSF.valid && !this.captchaSF.valid) {
return;
}