<!--packageE/article/article.wxml-->
<view class="component-wrapper {{'component-'+component_id}}">

  <!--文章静态-->
  <view>
    <view class="article">
      <view class="tab_box" wx:if="{{(datas.get_style == 1|| datas.get_style == 3) && datas.show_tab && !U_tabcontrol}}">
        <view class="ul tab_list">
          <van-tabs active="{{active}}"
                    swipeable
                    bind:change="onClick"
                    color="{{datas.title_active_color}}"
                    tab-class="tag">
            <van-tab title="全部分类" wx:if="{{datas.get_style == 1}}"
                     name="0" title-style="overflow: visible;white-space: nowrap;text-overflow: clip;background: {{datas.article_tab_bg}};color:{{active=='0'?datas.title_active_color:datas.title_color}};"></van-tab>
            <van-tab title="{{item.name}}" wx:for="{{categories}}"  name="{{item.id}}" wx:key="index" title-style="overflow: visible;white-space: nowrap;text-overflow: clip;background: {{datas.article_tab_bg}};color:{{active==item.id?datas.title_active_color:datas.title_color}};"></van-tab>
          </van-tabs>
        </view>
      </view>

      <block wx:if="{{datas.list && (datas.get_style == 1|| datas.get_style == 3)}}">
        <view class="article-list {{plugin_active ? 'member-article-list' : ''}}" wx:for="{{list}}" wx:key="index" wx:for-index="index" wx:for-item="item" data-item="{{item}}" catchtap="toNoticeInfo" style="background-color: {{datas.article_bg}};margin-top:{{datas.margin_top}}px;margin-bottom:{{datas.margin_bottom}}px;margin-left: {{datas.margin_left}}px;margin-right:{{datas.margin_right}}px;border-radius: {{datas.box_radius}}px;">
          <!-- 样式一图片 -->
          <view wx:if="{{datas.article_style == 1}}" class="image-style1">
            <yz-image custom-class="img" src="{{item.thumb || emptyImage}}" mode='aspectFill'/>
          </view>
          <view class="content">
            <view class="title" style="-webkit-box-orient: vertical; font-size: {{datas.text_size}}px;line-height: {{(datas.text_size + 2) || 16}}px;height: {{((datas.text_size + 2)*2) || 32}}px;">
              <text class="pay-money" wx:if="{{item.has_one_article_pay || item.is_pay == 1}}">付费</text><text>{{item.title}}</text>
            </view>
            <view class="message">
              <view class="author">{{item.author}}</view>
              <view class="time">{{item.created_at || item.virtual_at}}</view>
            </view>
          </view>
          <!-- 样式二图片 -->
          <view wx:if="{{datas.article_style == 2}}" class="image-style2">
            <yz-image custom-class="img" src="{{item.thumb || emptyImage}}" mode='aspectFill' />
          </view>
        </view>
      </block>
      <block wx:if="{{datas.list && datas.get_style == 2}}">
        <view class="article-list" wx:for="{{datas.list}}" wx:key="index" wx:for-index="index" wx:for-item="item" data-item="{{item}}" catchtap="toNoticeInfo" style="background-color: {{datas.article_bg}};margin-top:{{datas.margin_top}}px;margin-bottom:{{datas.margin_bottom}}px;margin-left: {{datas.margin_left}}px;margin-right:{{datas.margin_right}}px;border-radius: {{datas.box_radius}}px;">
          <!-- 样式一图片 -->
          <view wx:if="{{datas.article_style == 1}}" class="image-style1">
            <yz-image custom-class="img" src="{{item.thumb || emptyImage}}" mode='aspectFill' />
          </view>
          <view class="content">
            <view class="title" style="-webkit-box-orient: vertical; font-size: {{datas.text_size}}px;line-height: {{(datas.text_size + 2) || 16}}px;height: {{((datas.text_size + 2)*2) || 32}}px;">
              <text class="pay-money" wx:if="{{item.has_one_article_pay || item.is_pay == 1}}">付费</text><text>{{item.title}}</text>
            </view>
            <view class="message">
              <view class="author" wx:if="{{item.author}}">{{item.author}}</view>
              <view class="time">{{item.created_at || item.virtual_at}}</view>
            </view>
          </view>
          <!-- 样式二图片 -->
          <view wx:if="{{datas.article_style == 2}}" class="image-style2">
            <yz-image custom-class="img" src="{{item.thumb || emptyImage}}" mode='aspectFill' />
          </view>
        </view>
      </block>

      <view wx:if="{{(list.length <= 0 && (datas.get_style == 1|| datas.get_style == 3)) || (datas.list<= 0 && datas.get_style == 2) || noNotice}}"  style="width: 100%;height: 300rpx;line-height: 100rpx;text-align: center;font-size: 18px">
        <yz-image src='https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/blank.png' mode='heightFix' custom-style="height:200rpx"/>
      </view>

      <view wx:if="{{!noNotice && (datas.get_style == 1|| datas.get_style == 3)}}">
        <view class="loadMore" wx:if="{{isLoadMore}}" catchtap="getMoreData">
          {{language['加载更多']}}
        </view>
        <view class="loadMore" wx:if="{{bottomShowBolIndex == index && allLoaded}}">
          {{language['没有更多了']}}~~
        </view>
      </view>

    </view>
  </view>
</view>
