<!--pages/gongyiClass/gongyiClass.wxml-->
<custom-navi text="公益课程" back="{{true}}" home="{{true}}"></custom-navi>
<view class='gongyiClass'>
  <view class='top_gongyiClass'>
    <view style='border-bottom:1px solid #f0f0f0;height:46px'>
      <view wx:for="{{parentCategorys}}" wx:key="{{index}}" bindtap='parentTab' data-index='{{index}}' class='{{tabIndex==index?"firstTab":""}}'>
      {{item.title}}<view></view>
      </view>
    </view>
    <view>
      <text wx:for="{{subCategory1}}" bindtap='subTab' data-index='{{index}}' wx:key="{{index}}" wx:if="{{tabIndex==0}}" class='{{erjiTab==index?"firstTab":""}}'>{{item.title}}</text>
      <text wx:for="{{subCategory2}}" bindtap='subTab' data-index='{{index}}' wx:key="{{index}}" wx:if="{{tabIndex==1}}" class='{{erjiTab==index?"firstTab":""}}'>{{item.title}}</text>
    </view>
  </view>
  <view class='conSwiper' wx:if="{{!isMember}}">
    <image src='../../img/dongNews.png'></image>购买中国志愿者会员,公益视频免费看!<view bindtap='memberChange'>查看</view>
  </view>
  <view class='lookHistory'>
    <view><view class='leftLine'></view>全部<view class='rightLine'></view></view>
    <text bindtap='history'>历史</text>
  </view>

<scroll-view scroll-y="true" style='height:660rpx;bottom:10rpx;' class="listPublicWelfare" bindscrolltolower='loadMore'>
    <view class='activelist' bindtap='classDetails' wx:for="{{list}}" data-index="{{list[index].id}}">
      <view class='left_listPublicWelfare'>
        <image src='{{item.front_image}}'></image>
      </view>
      <view class='right_listPublicWelfare'>
        <text>{{item.title}}</text>
        <view>
          <!--<van-button type="default" size="mini">小学课堂</van-button>-->
          <image src='../../img/kefu.png'></image>
          <text>{{item.view_count}}</text>
        </view>
        <text>主讲教师：{{item.teacher}}</text>
      </view>
      <text></text>
    </view>
</scroll-view>

<!--
  <view class='listPublicWelfare'>
    <view bindtap='classDetails' wx:for="{{list}}" wx:key="{{index}}">
      <view class='left_listPublicWelfare'>
        <image src='{{item.front_image}}'></image>
      </view>
      <view class='right_listPublicWelfare'>
        <text>{{item.title}}</text>
        <view>
          <van-button type="default" size="mini">小学课堂</van-button>
          <image src='../../img/kefu.png'></image>
          <text>10000</text>
        </view>
        <text>主讲教师：{{item.teacher_name}}</text>
      </view>
    </view>
  </view>
-->

</view>

<!--默认隐藏加载等待-->
<view ><loading wx:if="{{showLoading}}">正在加载</loading></view>
