search.wxml 3.9 KB
<view class="sousuo">
  <view class="search">
    <!-- <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
      <view class="searchleft">
        <view class="searchleftname">{{array[indexk]}}</view>
        <view class="searchsanjiao">
          <image src='/img/sanjiaodown.png'></image>
        </view>

      </view>
    </picker> -->
    <view class="searchright">
      <view class="searchfightimg" bindtap="sousuo" wx:if="{{sousuoword}}">
        <image src="/img/sousuo.png"></image>
      </view>
      <view class="searchfightimg" wx:else>
        <image src="/img/sousuo.png"></image>
      </view>
      <view class="searchrightname">
        <input placeholder='不同的搜索内容用空格隔开' bindinput='enterword' bindblur='shuru' value="{{keyword}}"/>
      </view>
    </view>
  </view>
  <view class="sousuoname" bindtap="sousuo" wx:if="{{sousuoword}}">搜索</view>
  <view class="sousuoname" wx:else>搜索</view>
</view>

<view class="showitem" wx:if="{{show}}">
  <view class="keyworditem"  wx:for="{{wordlist}}" wx:for-item="word_item"  wx:key="index">
    <view class="history">{{word_item.typename}}</view>
    <view class="searchjilu">
      <view class="searchjiluitem {{word_item.sel==true?'selactive':''}}" wx:for="{{word_item.son}}" data-parent_id="{{word_item.id}}" data-id="{{item.id}}" bindtap="seladdress" wx:key="child_index" data-index="{{index}}" data-name="{{item.name}}">
        {{item.name}}
      </view>
    </view>
  </view>

  <!-- <view class="keyworditem">
    <view class="history">搜索内容关键词</view>
    <view class="searchjilu">
      <view class="searchjiluitem {{item.sel==true?'selactive':''}}" wx:for="{{text}}" bindtap="textsearch" data-id="{{item.id}}" data-index="{{index}}" wx:key='' bindtap="seltext">{{item.name}}</view>
    </view>
  </view>

  <view class="keyworditem">
    <view class="history historyk">搜索价格关键词
      <text class='bioazhun'>2k标准</text> </view>
    <view class="searchjilu">
      <view class="searchjiluitem {{item.sel==true?'selactive':''}}" wx:for="{{price}}" data-price="{{item.name}}" wx:key='' bindtap="selprice" data-index="{{index}}">{{item.name}}</view>
    </view>
  </view> -->

</view>
<view wx:else>
  <view class="nodata" wx:if="{{searcharr.length==0}}">暂无数据</view>
  <view wx:else>
    <!-- 搜索视频 -->
    <view class="searchlist" wx:if="{{showlist==1}}">
      <view class="searchlistbox">
        <view wx:for="{{searcharr}}" wx:key='' bindtap="govideo" data-url="{{item.video}}" data-id="{{item.id}}">
          <view class="searchboximg">
            <image src="{{item.thumbnail}}"></image>
            <view class="anniu">
              <image src="/img/anniu.png"></image>
            </view>
          </view>
          <view class="picboxname">{{item.title}}</view>
        </view>
      </view>
    </view>
    <!-- 搜素图片 -->
    <view class="searchimglist" wx:if="{{showlist==2}}">
      <view wx:for="{{searcharr}}" wx:key='' bindtap="gopic" data-id="{{item.id}}">
        <view class="searchimgitem">
          <image src="{{item.thumbnail}}"></image>
        </view>
        <view class="picboxname">{{item.title}}</view>
      </view>
    </view>
    <!-- 搜素精美大片 -->
    <view class="searchlist" wx:if="{{showlist==3}}">
      <view class="searchlistbox">
        <view class="searchboximg" wx:for="{{searcharr}}" wx:key='' bindtap="govideomei" data-url="{{item.video}}">
          <image src="{{item.thumbnail}}"></image>
          <view class="anniu">
            <image src="/img/anniu.png"></image>
          </view>
        </view>
        <view class="picboxname">{{item.title}}</view>
      </view>
      <!-- <view class="moreshuju" bindtap="jiazai">
    <view class="moreshujuleft">
      <image src="/img/more.png"></image>
    </view>
    <view class="moredata">点击加载更多</view>
  </view> -->
    </view>
  </view>
</view>