<view class="searchcontent">
  <view class="soso uou {{show? 'noscroll':''}}">
    <view class="search">
      <view class="left">
        <van-icon name="arrow-left" size="20" catchtap="tapUpper"></van-icon>
        <view class="searchBox" >
          <!-- <van-field value="{{ inputs }}" placeholder="请输入内容" border="{{ false }}" bind:inp="inpbtn" bind:confirm="search" clearable
          bind:clear="inpbtnclear" 
          bind:blur="searchBlur" bind:focus="searchfocus"
          /> -->
          <input type="search" placeholder="请输入内容" type="text" confirm-type="搜索" value="{{inputs}}" bindfocus="searchfocus" bindblur="searchBlur" bindinput="inpbtn" bindconfirm="search" />
          <view class="img-icon" catchtap='search' >
            <view class="img-icon-btn"></view>
          </view>
        </view>
      </view>
      <view class="right" catchtap="classifyBolbtn">
        <view wx:if="{{showcccc}}">
          <icon class="iconfont icon-sort_a"></icon>
        </view>
        <view wx:if="{{!showcccc}}">
          <icon class="iconfont icon-sort_b"></icon>
        </view>
      </view>
    </view>
    <!-- 搜索历史 -->
    <sarch-history  id="search_history" bind:clickTag="serachTag" showHistory="{{showHistory}}"></sarch-history>

    <view class="sort_box">
      <view class="sort_a ul">
        <view class="li" bindtap="toggle" data-idx="{{1}}">
          <view class="left {{hascolor=='1'?'sel':''}}">
            评价
          </view>
          <view class="right">
            <text class="icon_up {{colorshow=='1_1'?'sel':''}}"></text>
            <text class="icon_down {{colorshow=='1_2'?'sel':''}}"></text>
          </view>
        </view>
      </view>
      <view class="sort_b ul">
        <view class="li" bindtap="toggle" data-idx="{{2}}">
          <view class="left {{hascolor=='2'?'sel':''}}">
            销量
          </view>
          <view class="right">
            <text class="icon_up {{colorshow=='2_1'?'sel':''}}"></text>
            <text class="icon_down {{colorshow=='2_2'?'sel':''}}"></text>
          </view>
        </view>
      </view>
      <view class="sort_c ul">
        <view class="li" bindtap="toggle" data-idx="{{3}}">
          <view class="left {{hascolor=='3'?'sel':''}}">
            价格
          </view>
          <view class="right">
            <text class="icon_up {{colorshow=='3_1'?'sel':''}}"></text>
            <text class="icon_down {{colorshow=='3_2'?'sel':''}}"></text>
          </view>
        </view>
      </view>
      <view class="sort_c ul" catchtap="showbox">
        筛选
      </view>
    </view>
    <cGoodsList goods='{{goods}}' loading="{{loading}}" classifyBol="{{classifyBol}}" kind='{{kind}}' text='搜索结果' id="cg" goods_template="{{goods_template}}" ></cGoodsList>
    <view hidden="{{requestLoading}}">
      <yz-blank datas='{{goods}}' text='没找到相关产品，换个词搜搜吧'></yz-blank>
    </view>
  </view>

  <backup wx:if="{{btnFlag}}" datas="{{btnData}}"  component_id="{{1}}"></backup>

  <van-popup show="{{ show }}" custom-class="custom-class" position="right" bind:close="onClose">
    <scroll-view scroll-y style="height: 100vh;">
      <view class="screening">
        <view class="header">
          <view class="span" catchtap="changetype" data-key="{{key}}">{{ screentitle[0] }}
          </view>
        </view>
        <view class="div1">
          <view class="div" wx:for-index="key" wx:for-item="val" wx:key="id" wx:for="{{brand}}"
                data-id="{{val.id}}"
                catchtap="screenbrand">
            <yz-image src="{{val.logo}}" mode='widthFix'/>
            <view class="span">{{ val.name }}</view>
          </view>
        </view>
        <!-- 如果是点击分类进来的就不显示 -->
        <view class="header" wx:if="{{!istypeclass}}">
          <view class="span" catchtap="changetype" data-key="{{key}}">{{ screentitle[1] }}
          </view>
        </view>
        <!-- 如果是点击分类进来的就不显示 -->
        <view class="div2" wx:if="{{!istypeclass}}">
          <van-collapse value="{{ activeName }}" bind:change="onChange" accordion>
            <view wx:for-index="key" wx:for-item="val" wx:for="{{classification1}}" wx:key="id" class="divbox"
                  data-id="{{val.id}}" data-key="{{key}}" catchtap="classificationtype">
              <van-collapse-item wx:if="{{val.name}}" title="{{val.name}}" name="{{key}}"
                                 icon="{{classificationkey == key ? 'passed' : ''}}" is-link="{{val.son.length > 0}}">
                <view class="classify">
                  <view wx:for-index="key1" wx:for-item="val1" wx:for="{{val.son}}" class="divbox1" wx:key="id" >
                    <view wx:if="{{classificationId1 == null}}"
                          data-parent-index="{{key}}"
                          class="p {{ classificationId1 == val1.id ? 'chooseFir':'' }}" data-id="{{val1.id}}"
                          data-key="{{key1}}" catchtap="classificationtype1">
                      <image
                          class="img-box {{classificationId1 != val1.id?'color1':''}}"
                          src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/current@3x.png"
                          mode='widthFix'
                      ></image>
                      {{ val1.name?val1.name:'' }}
                      <!--<text class="span {{classificationkey1 != key1?'color1':''}}"></text>-->
                    </view>

                    <view class="middle" wx:if="{{classificationId1 == val1.id}}">
                      <view class="p {{ classificationId1 == val1.id ? 'chooseFir':'' }}" data-id="{{val1.id}}"
                            data-key="{{key1}}" catchtap="classificationtype1">
                        <image
                            class="img-box {{classificationId1 != val1.id?'color1':''}}"
                            src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/current@3x.png"
                            mode='widthFix'
                        ></image>
                        {{ val1.name?val1.name:'' }}
                        <!--<text class="span {{classificationkey1 != key1?'color1':''}}"></text>-->
                      </view>
                    </view>

                    <view class="box-second">
                      <view wx:for-index="key2" wx:for-item="val2" wx:for="{{val1.has_many_children}}" wx:key="id"
                            catchtap="classificationtype2" wx:if="{{classificationId1 == val1.id}}"
                            class="divbox2 {{ classificationId2 == val2.id ? 'choose-third': ''}}" data-id="{{val2.id}}"
                            data-key="{{key2}}">
                        {{ val2.name?val2.name:'' }}
                        <image
                            class="img-box {{classificationId2 != val2.id?'color1':''}}"
                            src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/cur@3x.png"
                            mode='widthFix'
                        ></image>
                        <!--<text class="span {{classificationkey2 != key2?'color1':''}}"></text>-->
                      </view>
                    </view>

                  </view>
                </view>
              </van-collapse-item>
            </view>
          </van-collapse>
        </view>
        <view class="header">
          <view class="span" catchtap="changetype" data-key="{{key}}">{{ screentitle[2] }}
          </view>
        </view>
        <view class="div3">
          <view class="p" wx:for-index="key" wx:key="id" wx:for-item="val" wx:for="{{attr}}" data-key="{{key}}"
                catchtap="selectattr">
            {{ val.name }}
            <view class="img {{val.show?'color1':''}}">
              <image
                  class="img-box"
                  src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/current@3x.png"
                  mode='widthFix'
              ></image>
            </view>
            <!--<text class="span {{val.show?'color1':''}}"></text>-->
          </view>
        </view>
        <view class="header">
          <view class="span" catchtap="changetype" data-key="{{key}}">{{ screentitle[3] }}
          </view>
        </view>
        <view class="div4">
          <view class="dl" wx:for-index="key" wx:key="id" wx:for-item="val" wx:for="{{tagname}}">
            <view class="dt">
              {{ val.name }}
              <view class="p" data-key="{{key}}" catchtap="showtagname" wx:if="{{val.value.length > 4}}">{{
                showtagnamekey
                != key ? "更多" : "收起" }}
                <view class="span icon {{showtagnamekey == key?'icon1':''}}"></view>
              </view>
            </view>
            <view class="dd div4-dd {{showtagnamekey != key? 'color2':''}}">
              <view class="span {{ val1.record == 2 ?'color':''}}" wx:for-index="key1" wx:key="id"
                    wx:for-item="val1" wx:for="{{val.value}}"
                    catchtap="selectname" data-id="{{val1.id}}" data-key="{{key}}" data-keyx="{{key1}}">{{ val1.name }}
              </view>
            </view>
          </view>
          <view class="btn-box">
            <view class="div resert" catchtap="resetnames">重置</view>
            <view class="div quedin" catchtap="screen">确定</view>
          </view>
        </view>
      </view>
    </scroll-view>
  </van-popup>
</view>
<!--<shopfoot></shopfoot>-->
