<!--packageF/others/historyGroup/historyGroup.wxml-->
<wxs module="util">
  var slice = function (val, start, end) { if (val) { return val.slice(start, end) } };
  module.exports.slice = slice;
</wxs>
<view class="group_list">
  <view class="group_item" wx:for='{{groupList}}' wx:key="index" wx:for-index="index" wx:for-item="item">
    <view class="group_id">团ID：{{item.id}}</view>
    <view class="time">{{item.updated_at}}</view>
    <view class="user_logo_list">
      <view class="user_logo_item" wx:for='{{util.slice(item.has_many_team_member,0,3)}}' wx:key="i" wx:for-index="i" wx:for-item="user">
        <image class="logo" src="{{user.avatar || emptyImage}}" alt=""/>
        <text class="tag" wx:if="{{user.is_win == 1}}">{{user.lottery_name}}</text>
      </view>
      <view class="user_logo_item" catchtap="openMore" data-item="{{item}}" wx:if="{{item.has_many_team_member.length > 3}}">
        <view class="more">...</view>
      </view>
    </view>
    <view class="other_logo" wx:if="{{item.has_many_team_member.length > 3}}">
      <view class="other_item" wx:for='{{util.slice(item.has_many_team_member,3,13)}}' wx:key="j" wx:for-index="j" wx:for-item="logo">
        <image class="small_logo" src="{{logo.avatar || emptyImage}}" alt=""/>
      </view>
    </view>
  </view>
</view>
<van-popup show="{{showGroup}}" round closeable bind:close="closeMore" bind:click-overlay="closeMore"
           custom-style="width: 85%;">
  <view class="pop-content">
    <view class="title">全部名单</view>
    <view class="user_logo_list">
      <view class="user_logo_item" wx:for='{{showGroupMember}}' wx:key="i" wx:for-index="i" wx:for-item="user">
        <image class="logo" src="{{user.avatar || emptyImage}}" alt=""/>
        <text class="tag" wx:if="{{user.is_win == 1}}">{{user.lottery_name}}</text>
      </view>
    </view>
  </view>
</van-popup>
