12345678910111213141516171819202122232425262728293031323334 |
- <view class='list-city'>
- <!-- 城市列表 -->
- <scroll-view scroll-y="true" style="height:100%;" scroll-into-view="{{scrollTopId}}" scroll-with-animation="true" enable-back-to-top="true">
- <view class='item' style="padding-bottom:25rpx;">
- <view class='py'>当前城市</view>
- <view class='fullname hot-city' data-name="{{city}}" bindtap='selectCity'>{{city}}</view>
- </view>
- <!-- 热门城市 -->
- <view class='item' style="padding-bottom:25rpx;">
- <view class='py' id="hot">热门城市</view>
- <view style="width:720rpx;margin-right:30rpx">
- <view class="hot-city" wx:for="{{hotCityData}}" wx:key="key" data-name="{{item.name}}" data-lat="{{item.location.lat}}" data-lng="{{item.location.lng}}" bindtap='selectCity'>{{item.fullname}}
- </view>
- </view>
- </view>
- <!-- 全部 -->
- <view class='item' wx:for="{{cityData}}" wx:for-index="idx" wx:for-item="group" wx:key="key">
- <view class='py' id="{{idx}}">{{idx}}</view>
- <view class="fullname" wx:for="{{group}}" wx:key="key" data-name="{{item.name}}" data-lat="{{item.location.lat}}" data-lng="{{item.location.lng}}" bindtap='selectCity'>{{item.fullname}}
- </view>
- </view>
- </scroll-view>
- <!-- 首字母 -->
- <view class='city-py' bindtouchstart="tStart" bindtouchend="tEnd" catchtouchmove="tMove">
- <view wx:for="{{_py}}" wx:key="key" bindtouchstart="getPy" bindtouchend="setPy" id="{{item}}">{{item == 'hot' ? "★" : item}}
- </view>
- </view>
- </view>
- <!--选择显示-->
- <view hidden="{{hidden}}" class="showPy">{{showPy == 'hot' ? "★" : showPy}}</view>
|