<!--packageC/micro_communities/microAttention/microAttention.wxml-->
<wxs src="./filter.wxs" module="filter" />
<view class="micro_attention">

  <view class="nav-top set-pc-style">
    <view class="shooting" bindtap="toEdit">
      <image src='https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/micro_communities/focous_photo.png' mode='widthFix' /> <text>随拍</text>
    </view>
    <text class="span">关注</text>
  </view>

  <view class="list">

    <view class="list-li" wx:for="{{info}}" wx:key="index" wx:for-index="index">

      <view class="top-box">
        <view class="img">
          <image catchtap="gotoHome" data-micuid="{{item.user_id}}" src='{{item.has_one_stick_user.avatar}}' mode='widthFix' />
          <text class="p">{{item.has_one_stick_user.nickname}}</text>
        </view>
        <image bindtap="showUnsubscribe" data-stickid="{{item.user_id}}" class="more" src='https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/micro_communities/more_black.png' style="padding:20rpx 0;" mode='widthFix' />
      </view>

      <view class="text-box" bindtap="gotoMicrocommentdetails" data-stickid="{{item.id}}">{{item.title}}</view>

      <view class="banner">
        <swiper indicator-dots="{{false}}" bindchange="sidingsImg" autoplay="{{false}}" circular="{{true}}" indicator-active-color="#007aff">
          <block wx:for="{{item.has_many_image}}" wx:key="index" wx:for-item="imgs" wx:for-index="index">
            <swiper-item>
              <image src="{{imgs.url}}" mode='widthFix' />
            </swiper-item>
          </block>
        </swiper>
        <view class="bannerindex">{{ bannerindex}} / {{ filter.setLength(item.has_many_image)}}</view>
      </view>

      <view class="Features-box">
        <view class="tiem-box">{{item.created_at}}</view>
        <view class="Features-btn">
          <view class="btnIcon" catchtap="selectLike" data-item="{{item}}" data-index="{{index}}">
            <image wx:if="{{item.is_praise == 0}}" src='https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/micro_communities/foucus_like.png' mode='widthFix' />
            <image wx:if="{{item.is_praise == 1}}" src='https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/micro_communities/tab_focus_active.png' mode='widthFix' />赞
          </view>
          <view class="btnIcon" catchtap="subMainCommentBtn" data-id="{{item.id}}" data-ind="{{index}}">
            <image  src='https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/micro_communities/focus_chat.png' mode='widthFix' />评论
          </view>
        </view>
      </view>

      <view class="comment-box">
        <view class="comment-num">{{item.praise_num}}人赞过</view>
        <view class="comment-list">
          <block wx:for="{{item.comment}}" wx:key="index" wx:for-item="com" wx:for-index="index">
            <view class="li" wx:if="{{index<3}}">
              <text class="em" style="font-weight:bold;">{{com.uname}}</text>:<text>{{com.content}}</text>
            </view>
          </block>
        </view>
        <view lass="look-comment" bindtap="gotoMicrocommentdetails" data-stickid="{{item.id}}" wx:if="{{item.comment.length > 3}}">查看全部{{ filter.setLength(item.comment)}}条评论</view>
        <view lass="look-comment" wx:if="{{item.comment.length <= 0}}">暂无评论,留下您的精彩评论吧...</view>
        <view class="add-comment" catchtap="subMainCommentBtn" data-id="{{item.id}}" data-ind="{{index}}">
          <image  src='https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/micro_communities/foucus_writechat.png' mode='widthFix' />添加评论...
        </view>
      </view>

    </view>
    <view wx:if="{{isNOMore}}" style="text-align:center;color:#999;padding-top:20rpx;">没有更多啦~~</view>
    <view wx:if="{{info.length <= 0}}" class="blank">
      <image  src='https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/blank.png' mode='widthFix' />
    </view>

    <view style='height: 100rpx'></view>
  </view>


  <micro-footer activeId="2"></micro-footer>

  <van-popup show="{{isUnsubscribe}}" bind:click-overlay="isCoverLayer"  position="center" z-index='{{2000}}'>
    <view class="unsubID" bindtap="UnsubscribeMethob">
      取消关注
    </view>
  </van-popup>

  <van-popup show="{{mainCommentShow}}" bind:click-overlay="isCoverLayer" position="bottom" z-index='{{2000}}'>
    <view class="replyMainComment">
      <view class="left">
        <input type="text" value="{{maincomment}}" bindinput="maincommentinp" placeholder="请留下你的精彩评论吧" />
      </view>
      <view class="right" catchtap="subMainBtn">发送</view>
    </view>
  </van-popup>

</view>
