|
@@ -1,70 +1,90 @@
|
|
|
<form nz-form [formGroup]="form" (ngSubmit)="submit()" role="form">
|
|
|
- <nz-alert *ngIf="type === 0 && error && code != '651'" [nzType]="'error'" [nzMessage]="error" [nzShowIcon]="true" class="mb-lg">
|
|
|
- </nz-alert>
|
|
|
- <nz-alert
|
|
|
- *ngIf="error && code == '651'"
|
|
|
- [nzType]="'error'"
|
|
|
- [nzMessage]="error"
|
|
|
- [nzCloseText]="'申请license'"
|
|
|
- (nzOnClose)="getComputerInfo()"
|
|
|
- ></nz-alert>
|
|
|
- <nz-form-item>
|
|
|
- <nz-form-control [nzErrorTip]="'请输入用户名!' | i18n">
|
|
|
- <nz-input-group nzSize="large" nzPrefixIcon="user">
|
|
|
- <input nz-input formControlName="userName" placeholder="请输入用户名" (focus)="clearError()"/>
|
|
|
- </nz-input-group>
|
|
|
- </nz-form-control>
|
|
|
- </nz-form-item>
|
|
|
- <nz-form-item>
|
|
|
- <nz-form-control [nzErrorTip]="'请输入密码' | i18n">
|
|
|
- <nz-input-group nzSize="large" nzPrefixIcon="lock" [nzSuffix]="suffixTemplate">
|
|
|
- <input nz-input [type]="passwordVisible ? 'text' : 'password'" formControlName="password" placeholder="请输入密码" (focus)="clearError()"/>
|
|
|
- </nz-input-group>
|
|
|
- <ng-template #suffixTemplate>
|
|
|
- <span nz-icon *ngIf="passwordVisible" [nzType]="'eye-invisible'" (click)="passwordVisible = !passwordVisible"></span>
|
|
|
- <span nz-icon *ngIf="!passwordVisible" [nzType]="'eye'" (click)="passwordVisible = !passwordVisible"></span>
|
|
|
- </ng-template>
|
|
|
- </nz-form-control>
|
|
|
- </nz-form-item>
|
|
|
- <nz-form-item>
|
|
|
- <nz-form-control [nzErrorTip]="'请获取手机号!' | i18n">
|
|
|
- <nz-input-group nzSize="large" nzPrefixIcon="phone">
|
|
|
- <input nz-input type="text" formControlName="mobile" placeholder="手机号" [(ngModel)]="phone" [disabled]="true"/>
|
|
|
- </nz-input-group>
|
|
|
- </nz-form-control>
|
|
|
- <button nz-button nzType="primary" style="width: 112px" type="button" [disabled]="btnContent >= 1" (click)="getCaptcha();$event.preventDefault()" nzSize="large">{{btnContent == 0?'获取验证码':btnContent}}</button>
|
|
|
- </nz-form-item>
|
|
|
- <nz-form-item>
|
|
|
- <nz-form-control [nzErrorTip]="'请输入验证码!' | i18n">
|
|
|
- <nz-input-group nzSize="large" nzPrefixIcon="code">
|
|
|
- <input nz-input type="text" formControlName="captcha" placeholder="请输入验证码" />
|
|
|
- </nz-input-group>
|
|
|
- </nz-form-control>
|
|
|
- </nz-form-item>
|
|
|
-
|
|
|
-
|
|
|
+ <nz-alert *ngIf="type === 0 && error && code != '651'" [nzType]="'error'" [nzMessage]="error" [nzShowIcon]="true" class="mb-lg">
|
|
|
+ </nz-alert>
|
|
|
+ <nz-alert
|
|
|
+ *ngIf="error && code == '651'"
|
|
|
+ [nzType]="'error'"
|
|
|
+ [nzMessage]="error"
|
|
|
+ [nzCloseText]="'申请license'"
|
|
|
+ (nzOnClose)="getComputerInfo()"
|
|
|
+ ></nz-alert>
|
|
|
+ <nz-form-item>
|
|
|
+ <nz-form-control [nzErrorTip]="'ic.action.enter.accout' | i18n">
|
|
|
+ <nz-input-group nzSize="large" nzPrefixIcon="user">
|
|
|
+ <input nz-input formControlName="userName" [placeholder]="'ic.action.enter.accout' | i18n" (focus)="clearError()" />
|
|
|
+ </nz-input-group>
|
|
|
+ </nz-form-control>
|
|
|
+ </nz-form-item>
|
|
|
+ <nz-form-item>
|
|
|
+ <nz-form-control [nzErrorTip]="'ic.action.enter.password' | i18n">
|
|
|
+ <nz-input-group nzSize="large" nzPrefixIcon="lock" [nzSuffix]="suffixTemplate">
|
|
|
+ <input
|
|
|
+ nz-input
|
|
|
+ [type]="passwordVisible ? 'text' : 'password'"
|
|
|
+ formControlName="password"
|
|
|
+ [placeholder]="'ic.action.enter.password' | i18n"
|
|
|
+ (focus)="clearError()"
|
|
|
+ />
|
|
|
+ </nz-input-group>
|
|
|
+ <ng-template #suffixTemplate>
|
|
|
+ <span nz-icon *ngIf="passwordVisible" [nzType]="'eye-invisible'" (click)="passwordVisible = !passwordVisible"></span>
|
|
|
+ <span nz-icon *ngIf="!passwordVisible" [nzType]="'eye'" (click)="passwordVisible = !passwordVisible"></span>
|
|
|
+ </ng-template>
|
|
|
+ </nz-form-control>
|
|
|
+ </nz-form-item>
|
|
|
+ <nz-form-item>
|
|
|
+ <nz-form-control [nzErrorTip]="'请获取手机号!' | i18n">
|
|
|
+ <nz-input-group nzSize="large" nzPrefixIcon="phone">
|
|
|
+ <input
|
|
|
+ nz-input
|
|
|
+ type="text"
|
|
|
+ formControlName="mobile"
|
|
|
+ [placeholder]="'ic.menu.click.right.to.get.captcha' | i18n"
|
|
|
+ [(ngModel)]="phone"
|
|
|
+ [disabled]="true"
|
|
|
+ />
|
|
|
+ </nz-input-group>
|
|
|
+ </nz-form-control>
|
|
|
+ <button
|
|
|
+ nz-button
|
|
|
+ nzType="primary"
|
|
|
+ style="width: 112px"
|
|
|
+ type="button"
|
|
|
+ [disabled]="btnContent >= 1"
|
|
|
+ (click)="getCaptcha(); $event.preventDefault()"
|
|
|
+ nzSize="large"
|
|
|
+ >{{ btnContent == 0 ? ('ic.menu.get.captcha' | i18n) : btnContent }}</button
|
|
|
+ >
|
|
|
+ </nz-form-item>
|
|
|
+ <nz-form-item>
|
|
|
+ <nz-form-control [nzErrorTip]="'validation.verification-code.required' | i18n">
|
|
|
+ <nz-input-group nzSize="large" nzPrefixIcon="code">
|
|
|
+ <input nz-input type="text" formControlName="captcha" [placeholder]="'ic.action.enter.captcha' | i18n" />
|
|
|
+ </nz-input-group>
|
|
|
+ </nz-form-control>
|
|
|
+ </nz-form-item>
|
|
|
|
|
|
<nz-form-item>
|
|
|
- <button class="ic-login-button" nz-button type="submit" nzType="primary" nzSize="large" nzBlock>
|
|
|
+ <button class="ic-login-button" nz-button type="submit" nzType="primary" nzSize="large" nzBlock>
|
|
|
{{ 'app.login.login' | i18n }}
|
|
|
</button>
|
|
|
</nz-form-item>
|
|
|
|
|
|
<nz-form-item nz-row nzJustify="end">
|
|
|
-<!-- <nz-col-->
|
|
|
-<!-- *ngIf="showForgetPasswordButton"-->
|
|
|
-<!-- [nzSpan]="12"-->
|
|
|
-<!-- [ngClass]="{ 'text-right': !showRegisterButton }"-->
|
|
|
-<!-- class="login-forget-button-wrapper"-->
|
|
|
-<!-- >-->
|
|
|
-<!-- <ng-container>-->
|
|
|
-<!-- <label nz-checkbox>{{ '记住密码' | i18n }}</label>-->
|
|
|
-<!-- </ng-container>-->
|
|
|
-<!-- </nz-col>-->
|
|
|
+ <!-- <nz-col-->
|
|
|
+ <!-- *ngIf="showForgetPasswordButton"-->
|
|
|
+ <!-- [nzSpan]="12"-->
|
|
|
+ <!-- [ngClass]="{ 'text-right': !showRegisterButton }"-->
|
|
|
+ <!-- class="login-forget-button-wrapper"-->
|
|
|
+ <!-- >-->
|
|
|
+ <!-- <ng-container>-->
|
|
|
+ <!-- <label nz-checkbox>{{ '记住密码' | i18n }}</label>-->
|
|
|
+ <!-- </ng-container>-->
|
|
|
+ <!-- </nz-col>-->
|
|
|
<nz-col *ngIf="showRegisterButton" [nzSpan]="12" 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()">{{ '忘记密码' | i18n }}</a>
|
|
|
+ <a class="forgot login-forget-button" (click)="forgetPassword()">{{ 'app.forget.password' | i18n }}</a>
|
|
|
</ng-container>
|
|
|
</nz-col>
|
|
|
</nz-form-item>
|