city.wxml 4.0 KB

1
  1. <view><view class="input"><input placeholder="输入城市名或拼音查询" placeholder-style="font-size: 13px" data-event-opts="{{[['input',[['bindKeyInput',['$event']]]],['blur',[['bindBlur',['$event']]]]]}}" value="{{inputName}}" bindinput="__e" bindblur="__e"/></view><view class="container-inner"><view class="searchLetter touchClass"><view data-event-opts="{{[['tap',[['hotCity',['$event']]]]]}}" class="thishotText" bindtap="__e"><view style="margin-top:0;">当前</view><view style="margin-top:0;">热门</view></view><block wx:for="{{searchLetter}}" wx:for-item="item" wx:for-index="idx" wx:key="idx"><view style="color:#8BC34A;font-size:20rpx;" data-letter="{{item.name}}" data-event-opts="{{[['tap',[['clickLetter',['$event']]]]]}}" bindtap="__e">{{''+item.name+''}}</view></block></view><view class="container"><block wx:if="{{isShowLetter}}"><view><view class="showSlectedLetter">{{''+toastShowLetter+''}}</view></view></block><scroll-view style="{{'height:'+(winHeight+'px')+';'}}" scroll-y="true" scroll-into-view="{{scrollTopId}}"><view class="ul" id="completelist"><block wx:for="{{completeList}}" wx:for-item="item" wx:for-index="idx" wx:key="idx"><view class="li" data-city="{{item.city}}" data-code="{{item.code}}" data-event-opts="{{[['tap',[['bindCity',['$event']]]]]}}" bindtap="__e">{{''+item.city+''}}</view></block></view><view class="selectCity"><view class="hotcity-common" id="currentcity" data-event-opts="{{[['tap',[['reGetLocation',['$event']]]]]}}" bindtap="__e">定位城市</view><view class="thisCityName" data-code="{{currentCityCode}}" data-city="{{currentCity}}" data-event-opts="{{[['tap',[['bindCity',['$event']]]]]}}" bindtap="__e">{{currentCity}}</view><view class="hotcity-common">热门城市</view><view class="weui-grids"><view class="weui-grid" data-code="{{110100}}" data-city="北京市" data-event-opts="{{[['tap',[['bindCity',['$event']]]]]}}" bindtap="__e"><view class="weui-grid__label">北京市</view></view><view class="weui-grid" data-code="{{310100}}" data-city="上海市" data-event-opts="{{[['tap',[['bindCity',['$event']]]]]}}" bindtap="__e"><view class="weui-grid__label">上海市</view></view><view class="weui-grid" data-code="{{440100}}" data-city="广州市" data-event-opts="{{[['tap',[['bindCity',['$event']]]]]}}" bindtap="__e"><view class="weui-grid__label">广州市</view></view></view><view class="weui-grids"><view class="weui-grid" data-code="{{440300}}" data-city="深圳市" data-event-opts="{{[['tap',[['bindCity',['$event']]]]]}}" bindtap="__e"><view class="weui-grid__label">深圳市</view></view><view class="weui-grid" data-code="{{330100}}" data-city="杭州市" data-event-opts="{{[['tap',[['bindCity',['$event']]]]]}}" bindtap="__e"><view class="weui-grid__label">杭州市</view></view><view class="weui-grid" data-code="{{320100}}" data-city="南京市" data-event-opts="{{[['tap',[['bindCity',['$event']]]]]}}" bindtap="__e"><view class="weui-grid__label">南京市</view></view></view><view class="weui-grids"><view class="weui-grid" data-code="{{420100}}" data-city="武汉市" data-event-opts="{{[['tap',[['bindCity',['$event']]]]]}}" bindtap="__e"><view class="weui-grid__label">武汉市</view></view><view class="weui-grid" data-code="{{120100}}" data-city="天津市" data-event-opts="{{[['tap',[['bindCity',['$event']]]]]}}" bindtap="__e"><view class="weui-grid__label">天津市</view></view><view class="weui-grid" data-code="{{610100}}" data-city="西安市" data-event-opts="{{[['tap',[['bindCity',['$event']]]]]}}" bindtap="__e"><view class="weui-grid__label">西安市</view></view></view></view><block wx:for="{{cityList}}" wx:for-item="item" wx:for-index="idx" wx:key="idx"><view class="selection"><view class="item_letter" id="{{item.initial}}">{{item.initial}}</view><block wx:for="{{item.cityInfo}}" wx:for-item="cityItem" wx:for-index="index" wx:key="index"><view class="item_city" data-code="{{cityItem.code}}" data-city="{{cityItem.city}}" data-event-opts="{{[['tap',[['bindCity',['$event']]]]]}}" bindtap="__e">{{''+cityItem.city+''}}</view></block></view></block></scroll-view></view></view></view>