<view class="at-container">
  <image mode="scaleToFill" src="/static/auth/icon-head.png" class="head-img" />
  <block a:if="{{ status.statusCode === 0 || status.statusCode === 1 }}">
    <view class="head-title">您正在使用身份授权认证服务</view>
    <view class="head-subtitle">为了给您提供更好的服务，{{ formOption.name }}将会向您申请授权使用您的部分信息。</view>
  </block>
  <block a:elif="{{ status.statusCode === 2 }}">
    <view class="head-title head-title-center">身份授权认证成功！</view>
  </block>
  <block a:elif="{{ status.statusCode === 3 }}">
    <view class="head-title head-title-center">{{ status.statusPrompt }}</view>
  </block>
  <view class="error-layout" a:if="{{ status.statusCode === 1 }}">
    <image mode="aspectFit" src="/static/auth/icon-warn.png" class="error-icon" />
    <view class="error-txt">{{ status.statusPrompt }}</view>
  </view>
  <view style="flex:auto;width: 100%;"></view>
  <block a:if="{{ status.statusCode === 0 }}">
    <auth-popup id="authPopup" onAuthResult="authResult"/>
    <view style="margin: 0 40rpx;display:flex;align-items:flex-start;">
      <checkbox class="protocol-checkbox {{protocolAgree ? 'protocol-checkbox-selected' : ''}}" color="#fff" value="1" checked="{{protocolAgree}}" onChange="protocolChange"/>
      <view class="protocol">
        您已知悉并同意<text class="protocol-top" data-type="{{protocolEnum.privacyPolicy}}" onTap="protocol">《隐私政策》</text>和<text class="protocol-top" data-type="{{protocolEnum.personalRules}}" onTap="protocol">《个人信息处理规则》</text>，并确认授权应用按照《个人信息处理规则》实施个人信息处理和用于身份核验
      </view>
    </view>
    <view class="submit-btn {{ !protocolAgree ? 'btn-disabled' : null }}" hover-class="{{ protocolAgree ? 'btn-hover' : null }}" hover-stay-time="100" onTap="authClick">同意并继续</view>
  </block>
  <block a:else>
    <view class="submit-btn" hover-class="btn-hover" hover-stay-time="100" onTap="backClick">返回</view>
  </block>
</view>