<import-sjs from='../../utils/index/utils.sjs' name='util'>
  <view class="{{showFaceScan?'page white':'page'}}" onTap="clickAudio">
    <view class="main">
      <top-title ref="saveRef" countdown="{{timer}}" onFinish="finish" showTitText="{{true}}" />
      <!-- 请刷身份证 -->
      <view a:if="{{ result=='刷身份证'  ||result=='首页刷证' }}">
        <view class="tit">请刷身份证</view>
        <view class="idcard">
          <view a:if="{{ brushingCardUserIInfo.name }}" class="name">
            {{ util.desensitization(brushingCardUserIInfo.name, 1, 2)}}
          </view>
          <view class="sex">{{brushingCardUserIInfo.sex}}</view>
          <view class="nation">{{brushingCardUserIInfo.nation}}</view>
          <view class="year">{{brushingCardUserIInfo.year}}</view>
          <view class="month">{{brushingCardUserIInfo.month}}</view>
          <view class="day">{{brushingCardUserIInfo.day}}</view>
          <view a:if="{{ brushingCardUserIInfo.address }}" class="address">
            {{ util.desensitization(brushingCardUserIInfo.address, 3, 10)}}
          </view>
          <view a:if="{{ brushingCardUserIInfo.idNum }}" class="idNum">
            {{util.desensitization(brushingCardUserIInfo.idNum, 6, 14)}}
          </view>
          <!--<image class="photoBase64" mode="scaleToFill" src="https://tx.hz-hanghui.com:8088/yx-fyzd/file/upload/imagesnew/static/home/center-four.png" /> -->
          <image class="photoBase64" mode="scaleToFill" src="data:image/png;base64,{{brushingCardUserIInfo.photoBase64}}" />
        </view>
      </view>
      <!-- 登记成功 -->
      <view a:if="{{ result=='登记成功' }}">
        <view class="tit">
          登记成功{{printVisitorList?'，正在打印访客单~':''}}
        </view>
        <image
          mode="scaleToFill"
          src="https://tx.hz-hanghui.com:8088/yx-fyzd/file/upload/imagesnew/static/result/sign-off.png"
          class="sign-off icon"
        />

      </view>
      <!-- 登记失败 -->
      <view a:if="{{ result=='登记失败' }}">
        <view class="tit">登记失败~</view>
        <image
          mode="scaleToFill"
          src="https://tx.hz-hanghui.com:8088/yx-fyzd/file/upload/imagesnew/static/result/sign-off-lose.png"
          class="sign-off icon"
        />
      </view>
      <!-- 联网查询 -->
      <view a:if="{{ result=='联网查询' }}">
        <view class="tip">
          <view>
            1、查询身份信息大约5-10秒，请耐心等待。
          </view>
          <view>
            2、如提示“未获取到公安网照片”，可重试一次。
          </view>
        </view>
        <image
          mode="scaleToFill"
          src="https://tx.hz-hanghui.com:8088/yx-fyzd/file/upload/imagesnew/static/result/network-query.png"
          class="network-query icon"
        />
      </view>
      <!-- 逃犯 有前科-->
      <view a:if="{{ result=='逃犯'||result=='有前科' }}">
        <view class="tit">系统故障！！！</view>
        <image
          mode="scaleToFill"
          src="https://tx.hz-hanghui.com:8088/yx-fyzd/file/upload/imagesnew/static/result/{{result=='逃犯'?'guzhang-red':'guzhang-yellow'}}.png"
          class="sign-off icon"
        />
      </view>

      <!-- 扫码签离 -->
      <view a:if="{{ result=='扫码签离' }}">
        <view class="tit m-t">请将二维码对准扫码窗进行签离~</view>
        <view class="flex1 m-t1">
          <image
            mode="scaleToFill"
            src="https://tx.hz-hanghui.com:8088/yx-fyzd/file/upload/imagesnew/static/result/qrcode.png"
            class="qrcode"
          />
          <image
            mode="scaleToFill"
            src="https://tx.hz-hanghui.com:8088/yx-fyzd/file/upload/imagesnew/static/result/fkj.png"
            class="fkj"
          />
        </view>
      </view>
      <!-- 签离失败 -->
      <view a:if="{{ result=='签离失败' }}">
        <view class="tit">签离失败~</view>
        <image
          mode="scaleToFill"
          src="https://tx.hz-hanghui.com:8088/yx-fyzd/file/upload/imagesnew/static/result/sign-off-lose.png"
          class="sign-off icon"
        />
      </view>
      <!-- 签离成功 -->
      <view a:if="{{ result=='签离成功' }}">
        <view class="tit">签离成功~</view>
        <view class="sign-off-box">
          <image
            mode="scaleToFill"
            src="https://tx.hz-hanghui.com:8088/yx-fyzd/file/upload/imagesnew/static/result/sign-off.png"
            class="sign-off"
          />
          <view class="success-msg">
            <image
              mode="scaleToFill"
              src="https://tx.hz-hanghui.com:8088/yx-fyzd/file/upload/imagesnew/static/result/sign-off.png"
              class="avatar"
            />
            <view class="msg">
              <view>{{util.desensitization(signOffUserInfo.name,1,2)}}</view>
              <view> {{util.desensitization(signOffUserInfo.idNumber,6,14)}}</view>
              <view>{{util.desensitization(signOffUserInfo.phone,3,7)}}</view>
              <view>
                受访人：{{util.desensitization(signOffUserInfo.visiteeXm,1,2)}}
              </view>
            </view>
          </view>
        </view>
      </view>
      <!-- 二维码获取失败 -->
      <view a:if="{{ result.indexOf('获取失败')>-1 }}">
        <view class="tit">{{result}}，请联系管理员或关闭此功能</view>
        <image
          mode="scaleToFill"
          src="https://tx.hz-hanghui.com:8088/yx-fyzd/file/upload/imagesnew/static/result/sign-off-lose.png"
          class="sign-off icon"
        />
      </view>

      <!-- 结果页超时 -->
      <view a:if="{{ result=='结果页超时' }}">
        <view class="tit">{{resultText}}</view>

        <image
          mode="scaleToFill"
          src="https://tx.hz-hanghui.com:8088/yx-fyzd/file/upload/imagesnew/static/result/sign-off-lose.png"
          class="sign-off icon"
        />
        <view
          a:if="{{isShowRetry&& clickRetryNum==0 }}"
          class="try-btn"
          onTap="retryFun"
        >
          重试
        </view>
      </view>
      <bottom-parnel
        suerName="{{(result=='刷身份证'&&brushingCardUserIInfo.name)||result=='首页刷证' ||result=='联网查询' ?'':'退出'}}"
        logoutName=""
        onSure="sure"
      />
      <!-- 刷脸页面 -->
      <view a:if="{{ showFaceScan }}" class="bgc">
      </view>
    </view>
  </view>
