Browse Source

PC登录页添加文字

wangxuan 3 tháng trước cách đây
mục cha
commit
293a9adab1

+ 6 - 1
src/app/routes/passport/login/login.component.html

@@ -81,7 +81,12 @@
     <!--        <label nz-checkbox>{{ '记住密码' | i18n }}</label>-->
     <!--      </ng-container>-->
     <!--    </nz-col>-->
-    <nz-col *ngIf="showRegisterButton" [nzSpan]="12" class="text-right login-register-button-wrapper">
+    <nz-col *ngIf="noticeMsg" [nzSpan]="18" class="text-right">
+      <ng-container>
+        <a style="caret-color: #bd2c00; color: red; display: block; text-align: left; word-break: break-all; width: 240px; overflow: hidden; text-overflow: ellipsis;">{{ noticeMsg }}</a>
+      </ng-container>
+    </nz-col>
+    <nz-col *ngIf="showRegisterButton" [nzSpan]="6" class="text-right login-register-button-wrapper">
       <ng-container>
         <!--        <a class="forgot login-register-button" (click)="goToRegister()">{{ registerButtonName | i18n }}</a>-->
         <a class="forgot login-forget-button" (click)="forgetPassword()">{{ 'app.forget.password' | i18n }}</a>

+ 10 - 0
src/app/routes/passport/login/login.component.ts

@@ -158,6 +158,7 @@ export class UserLoginComponent implements OnDestroy, OnInit {
   registerUrl = '/passport/login';
   lastClickTime = 0;
   clickInterval = 1000; // 设置合适的点击间隔
+  noticeMsg='';
 
   ngOnInit(): void {
     const queryInfos = { enabled: 'Y' };
@@ -206,6 +207,15 @@ export class UserLoginComponent implements OnDestroy, OnInit {
         }
       });
     }
+    // 后端提示
+    this.httpUtils.getPostData('inControlServer/qualityInspection/zhcxApi/getTodeyNotice',{}).subscribe({
+      next: res => {
+        if (res.code == '200' && res?.msg != null && res?.msg != '') {
+          //this.notification.warning('', res.msg);
+          this.noticeMsg = res.msg;
+        }
+      }
+    });
   }
   // #endregion