brands.wxml 1.78 KB

<import src="./brandSearch.wxml"/>

<block wx:if="{{searching}}"> 
  <brandSearch id="brandSearch" all_list="{{brandsList}}" hotKeyword="{{hotKeyword}}" bind:dismissSearchView="dismissSearchView"></brandSearch>
</block>
<block wx:else>
  <scroll-view class='container' style="height: {{scrollHeight}}px;" scroll-y scroll-into-view="{{scrollToView}}">
    <view class='newsearch' id="newsearch" bindtap="showSearchView">
      <image class="serachIcon" src="../../static/images/search@3x.png"></image>
      <view class="serach_view_show">搜索</view>
    </view>

    <view>
      <block wx:for="{{brandsList}}" wx:key="{{index}}" wx:for-item="brand">
        <view id="{{brand.letter == '#' ? 'last' : brand.letter}}" class='sessionTitle'>
          <text class='sessionText'>{{brand.letter}}</text> 
        </view>
        <block wx:for="{{brand.list}}" wx:key="{{unique}}" wx:for-item="brand">
          <template is="brand-list-item" data="{{item:brand}}"/>
        </block>
      </block>
    </view>
    
  </scroll-view>
  
  <view class="alphanet-selector" data-id="selector" catchtouchstart="handleTouchStart" catchtouchmove="handleMove" catchtouchend="handleMoveEnd">
    <view class="float-view" style="top:{{floatViewTop}}rpx;display:{{showFloatView?'':'none'}};">
      <image class="bubble" src="../../static/images/bubble@3x.png">
        <view class="float-letter">{{selectedLetter}}</view>
      </image>
    </view>
    <view  class="selector-one" wx:for="{{brandsList}}" wx:key="unique">
      <view id="{{item.letter == '#' ? 'lastLetter' : 'alphanet'+ item.letter}}" class="letter-text {{selectedLetter == item.letter? 'selected' : ''}}" data-ap="{{item.letter=='#' ? 'last' : item.letter}}">{{item.letter}}</view>
    </view>
  </view>

  <map-animation bottom="100"></map-animation>

</block>