<!--index.wxml-->
<view class="container">
  <view class="banner-box">
    <swiper class="banner-weiper" indicator-dots="{{indicatorDots}}" indicator-color="{{indicatorColor}}" indicator-active-color="{{indicatorActiveColor}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="{{circular}}">
      <block wx:for="{{background}}" wx:key="{{index}}">
        <swiper-item>
          <!-- <view class="select-banner {{item}}"></view> -->
          <image src="{{prodUrl}}web-cp-all/img_pm/img/{{item.file_id}}" class="slide-image" width="355" height="150" mode="scaleToFill"   bindtap='BannerNavigator' data-ind="{{index}}"></image>
        </swiper-item>
      </block>
    </swiper>
  </view>
  <view class="nav-box">
    <!-- 分类 -->
    <view class="nav-selse-navigator">
      <navigator wx:for="{{mainNav}}" wx:key="id" url="{{item.navUrl}}" hover-stay-time="{{hoverStayTime}}">
        <image src="{{item.imgUrl}}"></image>
        <view class="nav-text">{{item.text}}</view>
      </navigator>
    </view>
    <!-- 分类 -->
    <!-- <view class="nav-notice">
      <image src="images/notice.png"></image>
      <swiper class="notice-swiper" indicator-dots="{{false}}" autoplay="{{true}}" circular="{{true}}" vertical="{{true}}">
        <block wx:for="{{navNotice}}" wx:key="*this">
          <swiper-item>
            <view>
              <text>恭喜</text>
              <text class="notice-data-style">{{item.userName}}</text>
              <text>以</text>
              <text class="notice-data-style">{{item.amountOfMoney}}</text>
              <text>获得</text>
              <text class="notice-data-style notice-data-goods">{{item.goods}}</text>              
           </view> 
          </swiper-item>
        </block>
      </swiper>
    </view> -->
  </view>
  <view class="ad">
    <navigator  url="../ContentDetails/ContentDetails">
      <image src="../../images/ad.jpg"></image>
    </navigator>
  </view>
  <view class="listgoods-box">
    <view class="classify">
      <view class="classify-position {{classifyPosition?'classify-fixed':''}}" bindtap='onPageScroll'>
        <view wx:for="{{tabNav}}" wx:key="{{index}}" data-index="{{index}}" bindtap='onLoadTemplate'><text class="{{(tabIndex == item.select?'classify-select':'')}}">{{item.tabName}}</text></view>
      </view>
    </view>
    <view class="container-box">
      <import src="../../template/template.wxml"></import>
      <template is="{{templateName}}" data="{{goodsOpen,prodUrl}}" wx:if="{{tabIndex == 0}}"></template>
      <template is="{{templateName}}" data="{{goodsNotOpen,prodUrl}}" wx:else-if="{{tabIndex == 1}}"></template>
      <template is="{{templateName}}" data="{{goodsClose,prodUrl}}" wx:else-if="{{tabIndex == 2}}"></template>      
    </view>
  </view>
</view>
<!-- 红包弹窗 -->
<view class='red-packet' wx:if="{{is_first}}">
  <view class="close" bindtap='closeRedPacket'><icon type="clear" color="#fff"/></view>
  <image src='/images/red.png'></image>
  <view class="text">
    <text>5元“新人红包”</text>
  </view>
  <view class="btn">
    <button class="lj" bindtap='getRedPacket'>立即领取</button>
    <button class="hb" bindtap='navRedPacket'>我的红包</button>
  </view>
</view>
<!-- 主人翁红包 -->
<view class='red-packet' wx:if="{{is_share>0}}">
  <view class="close" bindtap='closeRedPacket'><icon type="clear" color="#fff"/></view>
  <image src='/images/red.png'></image>
  <view class="text">
    <text>{{is_share}}元“主人翁红包”</text>
  </view>
  <view class="btn">
    <button class="lj" bindtap='getRedPacket'>立即领取</button>
    <button class="hb" bindtap='navRedPacket'>我的红包</button>
  </view>
</view>