<!--pages/index/index.wxml-->
<custom-navi text="" back="{{false}}" home="{{false}}" background="#5296f4"></custom-navi>
<view class='indexBox'>
  <view class="indexHeader">
    <view class='con_indexHeader'>
      <view>
        <image src='../../img/conHeader.png'></image>
      </view>
    </view>
    <view class='title' bindtap='authorize'><image src='{{headerImg}}'></image>{{roleTitle}}欢迎回来</view>
  </view>
  <view class='girdList'>
    <view bindtap="volunteers">
      <image src='../../img/1.png'></image>
      <view>志愿活动</view>
    </view>
    <view wx:if="{{showSocial}}" bindtap="socialEvent">
      <image src='../../img/2.png'></image>
      <view>社会实践</view>
    </view>
    <view wx:if="{{showFamily}}" bindtap="familyEvent">
      <image src='../../img/2.png'></image>
      <view>亲子活动</view>
    </view>
    <view bindtap="mediaCourse">
      <image src='../../img/3.png'></image>
      <view>公益课堂</view>
    </view>
    <view wx:if="{{showNews}}" bindtap="news">
      <text class="messageCount" wx:if="{{unreadMessageCount>0}}">{{unreadMessageCount}}</text>
      <image src='../../img/4.png'></image>
      <view>消息通知</view>
    </view>
    <view bindtap="area" wx:if="{{role==4}}">
      <image src='../../img/4.png'></image>
      <view>区域管理</view>
    </view>
  </view>
  <view class='conSwiper' wx:if="{{!isMember}}">
    <image src='../../img/dongNews.png'></image>购买中国志愿者会员,公益视频免费看!<view bindtap='memberChange'>查看</view>
  </view>
  <view class='volunteers'>
    <view class='topTitle' wx:if="{{isvolunteerEventList}}">
      <view>
        <view class='leftLine'></view>
        <text>志愿者活动</text>
        <view class='rightLine'></view>
      </view>
      <text class='lookmore' bindtap='moreVolunteers'>更多</text>
    </view>
    <view class='listVolunteers'>
      <view bindtap='volunteersEventDetail' wx:for="{{volunteerEventList}}" data-index='{{item.id}}' wx:key="{{index}}">
        <view class='left_listVolunteers'>
          <image src='{{item.front_image}}'></image>
          <text>{{item.status_title}}</text>
        </view>
        <view class='right_listVolunteers'>
          <text class="itemTitle" >{{item.title}}</text>
          <view>
            <text>征集范围：{{item.scope}}\n</text>
            <text>征集人数：{{item.max_member}}人\n</text>
            <text>发布单位：{{item.author}}\n</text>
            <text>报名截止：{{item.enroll_time}}</text>
          </view>
        </view>
        <text></text>
      </view>
    </view>
    <!-- 社会实践 -->
    <view class='practice' wx:if="{{showSocial}}">
      <view>
        <view class='topTitle'>
          <view>
            <view class='leftLine'></view>
            <text>社会实践</text>
            <view class='rightLine'></view>
          </view>
          <!-- <text class='lookmore'>查看更多</text> -->
        </view>
        <view class='listPractice'>
          <view wx:for="{{socialEventList}}" bindtap='socialEventDetail' wx:key="{{index}}" data-index="{{item.event_id}}">
            <view class='left_listPractice'>
              <image src='{{item.front_image}}'></image>
            </view>
            <view class='right_listPractice'>
              <view>
                <text class="itemTitle">{{item.title}}\n</text>
                <text>{{item.publish_time}}</text>
              </view>
              <text>{{item.author}}</text>
            </view>
            <text></text>
          </view>
        </view>
      </view>
    </view>

    <!-- 亲子活动 -->
    <view class='qingzi' wx:if="{{showFamily}}">
      <view>
        <view class='topTitle'>
          <view>
            <view class='leftLine'></view>
            <text>亲子活动</text>
            <view class='rightLine'></view>
          </view>
          <!-- <text class='lookmore'>查看更多</text> -->
        </view>
        <view class='listPractice'>
          <view wx:for="{{familyEventList}}" bindtap='familyEventDetail' wx:key="{{index}}" data-index="{{item.event_id}}">
            <view class='left_listPractice'>
              <image src='{{item.front_image}}'></image>
            </view>
            <view class='right_listPractice'>
              <text class="itemTitle">{{item.title}}\n</text>
              <view>
                <text>发布人：{{item.author}}\n</text>
                <text>发布时间：{{item.publish_time}}\n</text>
              </view>
            </view>
            <text></text>
          </view>
        </view>
      </view>
    </view>
    <!-- 公益课堂 wx:if="{{ismediaList}}" -->
    <view class='publicWelfare'>
      <view class='topTitle'>
        <view>
          <view class='leftLine'></view>
          <text>公益课堂</text>
          <view class='rightLine'></view>
        </view>
        <!-- <text class='lookmore'>查看更多</text> -->
      </view>
      <view class='listPublicWelfare'>
        <view wx:for="{{mediaList}}" wx:key="{{index}}" bindtap='classDetails' data-index="{{item.id}}">
          <view class='left_listPublicWelfare'>
            <image src='{{item.front_image}}'></image>
          </view>
          <view class='right_listPublicWelfare'>
            <text class='activeTitle'>{{item.title}}</text>
            <view>
              <view style='padding:0px 5px 0 0;color:#0D76ED;font-size:14px;margin-right:5px'>小学课堂</view>
              <image src='../../img/kefu.png'></image>
              <text>{{item.view_count}}</text>
            </view>
            <text>主讲教师：{{item.teacher}}</text>
          </view>
          <text></text>
        </view>
      </view>
    </view>
  </view>
</view>
<van-dialog id="van-dialog" />