<!--packageE/others/case_library/home/caseLibraryHome.wxml-->
<view id="case-home-mobile" wx:if="{{view_show}}">
    <view>
      <block>
        <swiper autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" indicator-dots="true" indicator-color="rgba(153, 153, 153, 1)" indicator-active-color="rgba(255, 255, 255, 1)">
          <swiper-item wx:for="{{banner}}" wx:key="index" wx:for-item="slide" wx:if="{{slide.img_src}}">
            <view style="height:292rpx">
              <image style="width: 100%;height:292rpx" src="{{slide.img_src}}" />
            </view>
          </swiper-item>
        </swiper>
        <view wx:if="{{banner.length <= 0}}" style="width: 100%;height:292rpx;line-height:292rpx;background:#fff">
          ~~暂无轮播图~~
        </view>
      </block>
    </view>
    <view class="slide" wx:if="{{newCase.length > 0}}">
      <!-- <van-notice-bar scrollable="{{ false }}"> -->
        <swiper vertical class="notice-swipe" :autoplay="3000" :show-indicators="false" autoplay="{{autoplay}}">
          <swiper-item wx:for="{{newCase}}" wx:key="index">
            <view class="li">
              <view class="button">最新发布</view>
              <view class="name">{{ item.case_name }}</view>
              <view class="time" wx:if="{{item.created_at}}">{{ item.created_at }}</view>
              <view class="detail" catchtap="gotoCaseDetail" data-id="{{item.id}}">详情</view>
            </view>
          </swiper-item>
        </swiper>
      <!-- </van-notice-bar> -->
    </view>
    <view class="nav">
      <view class="li" catchtap="gotoOther" data-name='new'>
        <view class="img">
          <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/case-nav1.png" alt="" />
        </view>
        <view class="title">最新案例</view>
      </view>
      <view class="li" catchtap="gotoOther" data-name='category'>
        <view class="img">
          <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/case-nav2.png" alt="" />
        </view>
        <view class="title">全部分类</view>
      </view>
      <view class="li" catchtap="gotoOther" data-name='ranking'>
        <view class="img">
          <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/case-nav3.png" alt="" />
        </view>
        <view class="title">排行榜</view>
      </view>
      <view class="li" catchtap="gotoOther" data-name='area'>
        <view class="img">
          <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/case-nav4.png" alt="" />
        </view>
        <view class="title">区域案例</view>
      </view>
    </view>
    <view class="hot">
      <view class="top" wx:if="{{special.length > 0}}">
        <view class="img">
          <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/case-hot.png" alt="" />
        </view>
        <view class="title">热门专题</view>
        <view class="more" catchtap="gotoOther" data-name="subjectList">更多></view>
      </view>
      <view class="img-one">
        <view wx:for="{{special}}" wx:key="index" catchtap="gotoSpecial" data-id="{{item.id}}" style="border-radius: 10rpx;">
          <image src="{{item.special_banner_src}}" alt="" />
        </view>
      </view>
      <view class="img-two">
        <view wx:if="{{(!ad1 && !ad2) || (ad1.length ===0 && ad2.length ===0)}}" style="width: 100%;height:170rpx;line-height:170rpx;background:#fff;text-align: center;">
          ~~暂无广告图~~
        </view>
        <swiper wx:else indicator-dots="{{ad1.length !==0 && ad2.length !==0}}" style="width:100%;height:100%;" indicator-color="rgba(153, 153, 153, 1)" autoplay="{{autoplay}}" indicator-active-color="rgba(255, 255, 255, 1)">
          <swiper-item wx:if="{{ad1 && ad1.length !==0}}">
            <view  style="height:170rpx">
              <image style="width: 100%;height:170rpx" src="{{ad1.mobile_img}}"/>
            </view>
          </swiper-item>
          <swiper-item wx:if="{{ad2 && ad2.length !==0}}">
            <view style="height:170rpx">
              <image style="width: 100%;height:170rpx" src="{{ad2.mobile_img}}" />
            </view>
          </swiper-item>
        </swiper>
      </view>
    </view>
    <view class="hot-case">
      <view class="top">
        <view class="img">
          <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/case-new.png" alt=""></image>
        </view>
        <view class="title">热门案例</view>
      </view>
      <view class="category">
        <view
          wx:for="{{hotCategory}}"
          wx:key="index"
          catchtap="changeCategory"
          data-id="{{item.id}}"
          class="{{category_index == item.id?'li-selected':''}} li"
        >
          <view class="name">{{ item.category_name }}</view>
          <view class="hr"></view>
        </view>
      </view>
      <caseMobile datas="{{hotCasesList}}"></caseMobile>
      <view style="width: 100%;height: 40px;line-height: 40px;text-align: center;" wx:if="{{current_page >= last_page}}">
        没有更多了~
      </view>
    </view>

    <serviceTemplate></serviceTemplate>
  </view>
