<view class="container">
  <view class="search-w">
    <search-bar class="search-bar" bindinput="bindinput" />
    <view class="scan" bindtap="toScan"></view>
  </view>
  <view class="my-card-w">
    <view class="title m-t-32">我的名片</view>
    <view class="my-card-content" bindtap="toBusinessCard" data-id="{{ my_info.viewerId }}">
      <view class="card">
        <card scale="0.33" info="{{ my_info }}" />
      </view>
      <view class="info-item">
          <view class="title">{{ my_info.name }}</view>
          <view class="info-type">{{ my_info.companyPosition || '' }}</view>
          <view class="info-type company">{{ my_info.companyName || '' }}</view>
        </view>
    </view>
  </view>

  <view class="friend-card-w">
    <view class="title m-t-32">
      <view class="title-item {{ activeType == 0 ? 'is-active' : ''}}"  bindtap="changeActiveType" data-type="{{0}}">交换<text>({{ business_0.length }})</text></view>
      <view class="title-item {{ activeType == 1 ? 'is-active' : ''}}"  bindtap="changeActiveType" data-type="{{1}}">扫描<text>({{ business_1.length }})</text></view>
    </view>
    <view class="friend-card-content">
      <view class="friend-card-item" wx:for="{{business_list}}" wx:key="{{index}}"  bindtap="toBusinessCard" data-id="{{ item.viewerId }}">
        <view class="card">
          <card scale="0.33" info="{{ item }}" />
        </view>
        <view class="info-item" >
          <view class="title">{{ item.name }}</view>
          <view class="info-type">{{ item.companyPosition || '' }}</view>
          <view class="info-type company">{{ item.companyName || '' }}</view>
          <view class="create-time">{{ item.createTime }}</view>
          <view class="call">
            <icon icon="maps_call" catchtap="callPhone" size="24" data-phone="{{ item.phoneNum }}" />
          </view>
        </view>
      </view>
      <view class="no-data" wx:if="{{ noData }}" >无符合条件的数据</view>
    </view>
  </view>
</view>