<!--pages/visitor/visitor.wxml-->
<view class="visitor-page">
  <navBar wx:if="{{isMember}}" bg="url('https://chrivc.obs.cn-north-4.myhuaweicloud.com/68a423ea6a5a47df89377115791dbe12:HTAr4uskKoy39c1544ea6082be1b230c9a64772ff502.png');background-size: 750rpx 450rpx;">{{name}}</navBar>
  <navBar wx:else type="black">{{name}}</navBar>
  <view wx:if="{{!isMember}}" class="card">
    最近有{{total}}个用户查看了您的报告，开通会员看看谁查看了您的报告。
    <view class="btn" bind:tap="jumpMember">立即开通</view>
  </view>
  <view wx:elif="{{showCard}}" class="card">
    <image class="cancel" src="/assets/images/inspected/cancel.png" bind:tap="hideCard" />
    <view class="title">
      <image src="/assets/images/member/V.png" />
      年费会员
    </view>
    <view >您是尊贵的年费会员，可以查看所有访客的姓名、手机号以及查看次数。</view>
  </view>
  <view wx:if="{{list && list.length}}" class="list-box">
    <view wx:for="{{list}}" class="item-box">
      <view class="icon-box">
        <image src="/assets/images/report/user.png" />
      </view>
      <view class="user-info">
        <view wx:if="{{isMember}}" class="name">
          <text >{{item.name}}</text>
          <view class="line"></view>
          <text >{{item.phone}}</text>
        </view>
        <view wx:else class="name">
          <filter type="hideInformation" value="{{item.name}}" params="{{[1, 3]}}" />
          <view class="line"></view>
          <filter type="hideInformation" value="{{item.phone}}" params="{{[3, 11]}}" />
        </view>
        <view class="time"><filter type="parseTime" value="{{item.visitDates[item.visitDates.length-1]}}" params="{{['{y}-{m}-{d} {h}:{i}']}}"/>查看了您的信息</view>
        <view class="btn-box">
          <view >累计查看：<text class="warning">{{item.visitTimes}}</text></view>
          <view wx:if="{{isMember}}" class="btns">
            <btn plain width="200rpx" height="50rpx" fontSize="24rpx" style="margin-right: 20rpx">发送联系方式</btn>
            <btn plain width="140rpx" height="50rpx" fontSize="24rpx">去留言</btn>
          </view>
        </view>
      </view>
    </view>
  </view>
  <not wx:else top="200rpx"></not>
  <view wx:if="{{!isMember}}" class="bottom-container">
    <view class="icon-box">
      <image src="/assets/images/member/V.png" />
      年费用户可查看所有访客信息
    </view>
    <btn type="member" width="240rpx" height="82rpx" fontSize="28rpx" bind:tap="jumpMember">立即开通</btn>
  </view>
  <view wx:if="{{!isMember}}" class="bottom-fill"></view>
</view>
