<wxs src="../../utils/filter.wxs" module="filters" />

<view class="followBox">
  <view class="screening">
    <view class="type {{currentType==1?'currentType':''}}" data-type="1" bindtap="setType">我的关注（{{c1}}）</view>
    <view class="type {{currentType==2?'currentType':''}}" data-type="2" bindtap="setType">我的粉丝（{{c2}}） <view
        class="noticeTips" wx:if="{{userInfo.newFansCount>0}}">{{userInfo.newFansCount}}</view>
    </view>
    <view class="searchFriend" bindtap="searchFriend">
      <image src="/static/search.png" />
      找朋友
    </view>
  </view>
  <view class="box">
    <view class="userBox" wx:for="{{list}}" wx:key="index" bindtap="jumpUserInfo" data-uid='{{item.user.uid}}'>
      <view class="identity">
        <image class='avatar' src='{{ item.user.avatar}}'></image>
        <view class="identityText">{{item.user.profession}}</view>
      </view>
      <view class="userRight">
        <view class="topBox">
          <view class="row">
            <view class="nickName textOver">{{item.user.nickName||item.user.eid }}</view>
            <view class="gradeText textOver" data-eid="{{item.user.eid}}" catchtap="clipboar">学号：{{item.user.eid}}
              <image src="/static/copy.png" class="copy" />
            </view>
          </view>
          <view class="row">
            <view class="count">
              粉丝<text class="countNum textOver">{{filters.numFilter(item.fansAmount)|| '0'}}</text>
            </view>
            <view class="count">
              作品<text class="countNum textOver">{{filters.numFilter(item.readAmount)|| 0}}</text>
            </view>
            <view class="count countEnd">
              播放<text class="countNum textOver">{{filters.numFilter(item.playAmount) || 0}}</text>
            </view>
          </view>
        </view>
        <view class="btmBox">
          <view class="state" data-uid='{{item.user.uid}}' data-isEachOther="{{item.isEachOther}}" catchtap="setFans">
            <view class="stateText already" wx:if="{{currentType==1}}">
              <image src="/static/follow_2.png" class="character" wx:if="{{item.isEachOther}}" />
              {{item.isEachOther?'互相关注':'已关注'}}
            </view>
            <view class="stateText {{item.isEachOther?'already':'yet'}}" wx:else>
              <image src="/static/follow_2.png" class="character" wx:if="{{item.isEachOther}}" />
              {{item.isEachOther?'互相关注':'回关'}}
            </view>
          </view>
          <view class="follow isFans" data-user="{{item.user}}" catchtap="sendMsg">
            <image src="/static/sx.png" class="character" />
            <text>发私信</text>
          </view>
        </view>
      </view>
    </view>
  </view>
  <emptyBg wx:if="{{nullList}}" message='快去寻找小伙伴吧！' />
</view>