<nav title="实名认证"></nav>
<ion-content class="content">
  <div class="hred">
    <div class="hred-left">
      {{ title }}
    </div>
    <img src="https://file-cloud.fmode.cn/real-idcard.png" class="hred-img" />
  </div>
  @if (isReal) {
  <div class="tips">
    <img
      class="tips-img"
      src="https://file-cloud.fmode.cn/game-auth.png"
      alt=""
    />
    <div class="text">您已完成认证</div>
  </div>
  <div class="pf">
    <div style="margin-right: 10px">{{ secretName }}*</div>
    <div class="">{{ secretIdCard }}********</div>
  </div>
  <div class="agreement pflex">
    <span (click)="showAgreement()"
      >《{{ registerAgreement?.get("title") }}》</span
    >
  </div>
  } @else{
  <div class="h3">填写身份信息认证</div>
  <div class="li">
    真实姓名
    <input
      type="text"
      [(ngModel)]="name"
      name="name"
      autocomplete="off"
      placeholder="请填写真实姓名"
      autocomplete="new-password"
    />
  </div>
  <div class="li">
    {{cardtype == 'regions' ? '证件号码' : '身份证号'}}
    <input
      type="text"
      [(ngModel)]="idCard"
      maxlength="18"
      name="idCard"
      autocomplete="off"
      placeholder="请填写身份证号"
      autocomplete="new-password"
    />
  </div>

  @if (cardtype == 'cn') {
  <div class="footer" (click)="submit()">提交</div>
  <div class="agreement">
    <span class="abroad" (click)="cardtype = 'regions'">国外用户认证</span>
  </div>
  }@else {
  <div class="li row">
    请上传有效护照或外国永久居留证
    <app-upload
      (onChange)="changeFile($event)"
      #upload
      [maxlenght]="1"
      [files]="eduImage ? [{ url: eduImage }] : []"
      [fileWidth]="100"
      [fileHeight]="160"
      [boxWidth]="100"
      [active]="true"
      style="margin:10px auto;"
    ></app-upload>
  </div>
  <div class="footer" (click)="submitRegions()">提交</div>
  <div class="agreement">
    <span class="abroad" (click)="cardtype = 'cn'">国内用户认证</span>
  </div>
  }

  <div class="agreement">
    <ion-checkbox color="primary" [(ngModel)]="agreement"></ion-checkbox>
    <div class="agreement-content">
      阅读且同意<span (click)="showAgreement()">{{
        registerAgreement?.get("title")
      }}</span>
    </div>
  </div>
  }
</ion-content>
