login loading

This commit is contained in:
shimingxy 2025-11-05 08:49:59 +08:00
parent f34957cc1c
commit 866d42c278
2 changed files with 2 additions and 4 deletions

View File

@ -298,13 +298,12 @@ export class UserLoginComponent implements OnInit, OnDestroy {
}) })
.pipe( .pipe(
finalize(() => { finalize(() => {
this.loading = false;
this.cdr.detectChanges(); this.cdr.detectChanges();
}) })
) )
.subscribe(res => { .subscribe(res => {
this.loading = true;
if (res.code !== 0) { if (res.code !== 0) {
this.loading = false;
this.error = res.message; this.error = res.message;
//this.msg.error(this.error); //this.msg.error(this.error);
if (this.loginType === 'normal') { if (this.loginType === 'normal') {

View File

@ -158,13 +158,12 @@ export class UserLoginComponent implements OnInit, OnDestroy {
}) })
.pipe( .pipe(
finalize(() => { finalize(() => {
this.loading = false;
this.cdr.detectChanges(); this.cdr.detectChanges();
}) })
) )
.subscribe(res => { .subscribe(res => {
this.loading = true;
if (res.code !== 0) { if (res.code !== 0) {
this.loading = false;
this.error = res.message; this.error = res.message;
//this.msg.success(`登录失败,请重新登录!`); //this.msg.success(`登录失败,请重新登录!`);
this.getImageCaptcha(); this.getImageCaptcha();