<!--pages/gongyiClass/gongyiClass.wxml-->
<view class='gongyiClass'>
  <view class='top_gongyiClass'>
    <view wx:for="{{parentCategorys}}" wx:key="{{index}}" bindtap='parentTab' data-index='{{index}}' style='background:{{tabIndex==index?"#ccc":"#fff"}};color:{{tabIndex==index?"#fff":"#000"}}'>
    {{item.title}}
    </view>
    <text wx:for="{{subCategory1}}" bindtap='subTab' data-index='{{index}}' wx:key="{{index}}" wx:if="{{tabIndex==0}}">{{item.title}}</text>
    <text wx:for="{{subCategory2}}" bindtap='subTab' data-index='{{index}}' wx:key="{{index}}" wx:if="{{tabIndex==1}}">{{item.title}}</text>
  </view>
  <view class='conSwiper'>
    购买中国志愿者会员,公益视频免费看!<view bindtap='memberChange'>详情</view>
  </view>
  <view class='lookHistory'>
    <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>
    </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>
