<!--pages/buy/buy.wxml-->
<import src="../../module/header.wxml"/>
<import src="../../module/footer.wxml"/>
<import src="../../module/caritem/caritem.wxml"/>
<import src="../../module/search/search.wxml"/>
<template 
  is="header"
  data="{{title:'我要买车',headerheight:headerheight}}"
/>
<template
  is="search"
  data="{{topsearchheight:topsearchheight,searchshow:searchshow,searchfocus:searchfocus,windowh:windowh,brandrecommend:brandrecommend,keys:searchdata.keys,headerheight:headerheight}}"
/>
<page-scroll 
  className="content"
  styleSheet="height:{{windowh-headerheight-topsearchheight}}rpx;"
  scroll-y="{{selectbar==''?'true':'false'}}"
  bind:topheight="lockFilter"
  bind:scrolltolower="{{hasloadall?'':'loadListMore'}}"
>
  <view 
    class="filter_space"
    ></view>
  <!--筛选模块-->
  <view 
    class="filter_c"
    style="{{filterlock?'position: absolute; top:0rpx':'position: fixed; top:'+(headerheight+topsearchheight-1)+'rpx;'}}"
    >
    <view class="filter_nav">
      <block wx:for="{{filters}}" wx:key="name">
        <view  
          class="filter_nav_item {{selectbar==item.name?'filter_nav_item_active':''}}"
          bindtap="showFilter"
          data-name="{{item.name}}"
        >
          <view class="filter_nav_name">
            {{item.title}}
          </view>
          <image src="../../img/sortby.png" class="filter_nav_switch"/>
        </view>
      </block>
    </view>    
    <!--筛选排序模块-->
    <include src="./sort.wxml"/>

    <!--筛选价格模块-->
    <include src="./pricespace.wxml"/>
  </view>
  <view wx:if="{{!list}}"></view>
  <view wx:if="{{list.length>0}}" class="cart_list">
    <block wx:for="{{list}}" wx:key="id">
      <template is="caritem" data="{{car:item}}"/>
    </block>
  </view>
  <view wx:else class="you_may_like">    
    <view class="nocar_w">没有相关结果，可以试试其他条件</view>
    <view 
      bindtap="checkAll"
      class="nocar_back">查看所有好车</view>
    <view class="recommend">
      <view class="recommend_t">
        <image class="recommend_img" src="../../img/youmaylike.png"/>
      </view>
    </view>
    <view class="like_cart_c">
      <block wx:for="{{like}}" wx:key="id">
        <template is="caritem" data="{{car:item}}"/>
      </block>
    </view>
  </view>
  <template 
    is="footer"
    data="{{local:1,footerheight:footerheight}}"
  />
</page-scroll>
<!--筛选品牌模块-->
<brandlist
  brandrecommend = "{{brandrecommend}}"
  show="{{selectbar=='brand'?true:false}}"
  bind:close="closeBrandList"
  bind:select="selectSeries"
/>
<!-- <include src="./brandlist.wxml"/> -->
<!--  更多筛选条件 -->
<include src="./more.wxml"/>
