list.wxml 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. <wxs src='../../pages/wxs/util.wxs' module='filter' />
  2. <scroll-view scroll-y style="height: {{windowHeight}}px" scroll-into-view="{{alpha}}">
  3. <view class="alphabet">
  4. <view class="alphabet-list">
  5. <view class="section-item">
  6. <view class="section-item-cells">
  7. 请选择你所在的城市:
  8. <view class="section-item-cell" bindtap="setCity" data-city="{{city}}">
  9. <text class="icon-address"></text><text>当前城市:{{city || '定位中'}}</text>
  10. </view>
  11. </view>
  12. </view>
  13. <view wx:for="{{list}}" wx:key="unique" id="{{filter.letter(item.letter)}}" class="section-item">
  14. <view class="section-item-header">{{filter.letter(item.letter)}}</view>
  15. <view wx:for="{{item.city}}" wx:key="unique" wx:for-item="cell" wx:for-index="cellIndex" class="section-item-cells">
  16. <view class="section-item-cell {{cellIndex != (item.city.length-1) ? 'border-bottom':''}}" bindtap="setCity" data-city="{{cell}}">
  17. <text>{{cell}}</text>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </scroll-view>
  24. <view id="selector" catchtouchstart="handlerAlphaTap" catchtouchmove="handlerMove" catchtouchend='handlerEnd' class="alphanet-selector {{addBg?'bg':''}}">
  25. <view data-ap="{{filter.letter(item.letter)}}" wx:for="{{list}}" wx:key="unique" class="selector-one {{filter.letter(alpha) == filter.letter(item.letter) ? 'active':''}}">
  26. {{filter.letter(item.letter)}}
  27. </view>
  28. </view>
  29. <view wx:if="{{addBg}}" class='show-alpha'>
  30. {{filter.letter(alpha)}}
  31. </view>