<!--packageA/mycomponent/invitation/invitation.wxml -->
<view class="invitation" wx:if="{{tabList.length > 0}}">

  <view class="posts-live panel">
    <van-tabs active="{{ isPost }}" class="posts-live-tabs" bind:change="changeTab">
      <van-tab title="{{item.name}}" name="{{item.id}}" wx:for="{{tabList}}" wx:key="index"></van-tab>
    </van-tabs>
    <view class="posts-box-out" wx:if="{{isPost == 1}}">
      <swiper style="height:{{min_micro.length>0 && min_micro[0].length > 3 ? '440' : '220' }}rpx;" current="{{currentIndex}}" bindchange="swiperChange" circular="{{true}}">
        <swiper-item wx:for="{{min_micro}}" wx:for-item="value" wx:key="index" class="posts-box">
          <view class="posts-item" wx:for="{{value}}" wx:for-item="item" wx:key="index" catchtap="goMicro" data-id="{{item.stick_id}}" style="background-image: url({{item.url}})">
          </view>
        </swiper-item>
      </swiper>
      <view class="indication" style="bottom: -36rpx;" wx:if="{{min_micro.length>1}}">
        <block wx:for="{{min_micro}}" wx:key="index">
          <view class="spot{{index == currentIndex? ' active' : ''}}"></view>
        </block>
      </view>
    </view>

    <view class="live-room" wx:if="{{isPost == 2}}">
      <swiper class="my-swipe" current="{{currentIndex}}" bindchange="swiperChange" circular="{{true}}">
        <swiper-item wx:for="{{roomdata}}" wx:for-item="value" wx:key="index" class="my-swipe-item">
          <view class="live-room-item" wx:for="{{value}}" wx:key="index" catchtap="gopage" data-status="{{item.play_type}}" data-id="{{item.id}}" data-backid="{{item.back_id}}">
            <view class="live-bg">
              <image class="live-bg-img" src="{{item.cover}}" mode="aspectFill"></image>
              <view class="live-top">
                <view wx:if="{{item.play_type != 3}}" class="{{item.play_type == 1 ? 'living' : 'isBack'}}">{{item.play_type == 1?'直播中':'回放'}}</view>
                <view wx:if="{{item.play_type == 3}}" class="living">预告</view>
                <view wx:if="{{item.play_type != 3}}" class="live-num">{{item.view_num}}观看</view>
                <view class="goods_icon">
                  <icon class="iconfont icon-customform_list_2"></icon><text class="num">{{item.goods_num}}</text>
                </view>
              </view>
              <view class="live-title">
                {{item.title}}
              </view>
            </view>
            <view class="user">
              <view class="user-photo">
                <image src="{{item.avatar}}" ></image>
              </view>
              <view class="user-name text-overHide"><text>{{item.nickname}}</text></view>
            </view>
          </view>
        </swiper-item>
      </swiper>
      <view class="indication" wx:if="{{min_micro.length>1}}">
        <block wx:for="{{roomdata}}" wx:key="index">
          <view class="spot{{index == currentIndex? ' active' : ''}}"></view>
        </block>
      </view>
    </view>

    <view class="posts-live-all" catchtap="tapShow" wx:if="{{isPost == 1}}">
      <view class="text">查看全部</view>
      <icon class="iconfont icon-advertise-next"></icon>
    </view>
  </view>

  <!-- <van-popup get-container="#app" show="{{showPop}}" position="right" custom-style="height: 100%;width:100%;z-index:9999;">
    <van-nav-bar title="更多微贴" left-arrow bind:click-left="closeShow"/>
    <view class="list-post">
      <view class="item"wx:for="{{micro_communities.list}}" wx:key="index" catchtap="goMicro" data-id="{{item.id}}">
        <view class="userInfo" wx:if="{{item.has_one_stick_user}}">
          <view class="avatar">
            <image src="{{item.has_one_stick_user.avatar}}"></image>
          </view>
          <view class="nickname text-overHide">{{ item.has_one_stick_user.nickname }}</view>
        </view>
        <view class="evaluate">
          <view class="message">
            {{ item.title }}
          </view>
          <view class="album">
            <image wx:for="{{item.has_many_image}}" wx:for-item="value" class="img" src="{{value.url}}" mode="widthFix" wx:key="index"></image>
          </view>
        </view>
        <view class="bottom">
          <view class="comment">
            <icon class="iconfont icon-fontclass-pinglun1"></icon>
            <text class="num">{{ item.comment_num }}</text>
          </view>
          <view class="link">
            <icon class="iconfont icon-fontclass-dianzan"></icon>
            <text class="num"> {{ item.praise_num }}</text>
          </view>
        </view>
      </view>

      <text wx:if="{{page < last_page}}" catchtap="getMore" class="moreText">点击加载更多</text>
    </view>
  </van-popup> -->
</view>
