<!-- 注册账号 -->
@if (!isRegister) {
<ion-content fullscreen [style.background-image]="'url(img/poster.png)'">
  <div class="container" style="background-image: url('')">
    <div class="logo">
      <div class="invite-title">
        <span>{{ this.inviteUser?.get("nickname") }}</span> 邀请你加入hey聊
      </div>
      <img *ngIf="app?.get('logo')" [src]="app?.get('logo')" alt="" />
    </div>
    <div class="input">
      <div class="icon">
        <img src="img/phone.png" alt="" />
      </div>
      <ion-input
        inputmode="tel"
        pattern="tel"
        type="tel"
        [(ngModel)]="registerInfo.mobile"
        placeholder="请输入手机号"
      ></ion-input>
    </div>
    <div class="input">
      <div class="icon">
        <img src="img/security.png" alt="" />
      </div>
      <ion-input
        inputmode="numeric"
        placeholder="请输入验证码"
        [(ngModel)]="registerInfo.code"
      ></ion-input>
      <div
        class="captcha"
        (click)="sendVerifyCode(registerInfo.mobile)"
        *ngIf="!waitStatus"
      >
        获取验证码
      </div>
      <div class="captcha" *ngIf="waitStatus">{{ wait }}s</div>
    </div>
    <div class="input">
      <div class="icon">
        <img src="img/password.png" alt="" />
      </div>
      <ion-input
        [type]="inputType"
        [(ngModel)]="registerInfo.password"
        placeholder="6-18位数字，字母或符号组合"
      >
      </ion-input>
      <div class="watch" (click)="togglePassword()">
        <img
          src="{{ inputType == 'password' ? 'img/show.png' : 'img/hide.png' }}"
          alt=""
        />
      </div>
    </div>
    <div class="input">
      <div class="icon">
        <img src="img/password.png" alt="" />
      </div>
      <ion-input
        type="password"
        [(ngModel)]="registerInfo.confirmPassword"
        placeholder="请再次输入密码"
      ></ion-input>
    </div>
    <div class="input">
      <div class="icon">
        <img src="img/nickname.png" alt="" />
      </div>
      <ion-input
        type="text"
        [(ngModel)]="registerInfo.nickname"
        placeholder="请输入昵称"
      ></ion-input>
    </div>
    <div class="input">
      <div class="icon">
        <img src="img/invite.png" alt="" />
      </div>
      <ion-input
        type="text"
        [(ngModel)]="registerInfo.invite"
        placeholder="请输入邀请人（选填）"
      ></ion-input>
    </div>
    <div class="submit" style="margin-top: 0" (click)="registerUser()">
      立即注册
    </div>
    <!-- <div class="opts" style="justify-content: flex-end">
        <div
          class="forget"
          style="display: flex; align-items: center; color: #000000"
          (click)="status = 'login'"
        >
          已有账号，去登录
          <img
            style="
              width: 32px;
              height: 32px;
              transform: scale(0.5);
              margin-left: 5px;
            "
            src="img/login.png"
            alt=""
          />
        </div>
      </div> -->
    <div class="agreement">
      <ion-checkbox color="primary" [(ngModel)]="agreement"></ion-checkbox>
      <div class="content">
        我已阅读且同意<span (click)="showAgreement()"
          >《{{ registerAgreement?.get("title") }}》</span
        >
      </div>
    </div>
  </div>
</ion-content>
} @else {
<ion-content class="download">
  <div class="logo">
    <img *ngIf="app?.get('logo')" [src]="app?.get('logo')" alt="" />
  </div>
  <div class="block">
    <div class="li" (click)="downImg(app.get('apkUrl'))">
      <div class="h3">下载</div>
      <img class="android" src="img/android.png" alt="" />
    </div>
    <div class="li" (click)="downImg(app.get('itunesUrl'))">
      <div class="h3">下载</div>
      <img class="ios" src="img/ios.jpg" alt="" />
    </div>
  </div>
</ion-content>
}
