shimingxy пре 1 дан
родитељ
комит
866d42c278

+ 1 - 2
maxkey-web-frontend/maxkey-web-app/src/app/routes/passport/login/login.component.ts

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

+ 1 - 2
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/passport/login/login.component.ts

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