<view class="tab" bindtap="switchTab">
  <view class="tab_item {{tabIndex == 0?'active':''}}" id="0">一级伙伴</view>
  <view class="tab_item {{tabIndex == 1?'active':''}}" id="1">二级伙伴</view>
</view>
<block wx:if="{{downline.one.length > 0&&tabIndex == 0}}">
  <view class="downline">
    <view class="downline_item" wx:for="{{downline.one}}">
      <view class="avatar">
        <image src="{{item.headimgurl}}"></image>
      </view>
      <view class="user_name">{{item.nickname}}</view>
    </view>
  </view>
</block>

<view class="downline" wx:if="{{downline.two.length > 0&&tabIndex == 1}}">
  <block wx:for="{{downline.two}}">
    <view class="downline_item">
      <view class="avatar">
        <image src="{{item.headimgurl}}"></image>
      </view>
      <view class="user_name">{{item.nickname}}</view>
    </view>
  </block>
</view>

<block wx:if="{{downline.one.length == 0 ||!downline.one||!downline}}">
  <view class="downline_tips">暂无伙伴</view>
 </block>

