selectcity.wxml
2.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<view class='city_box'>
<view class='city_left'>
<scroll-view scroll-y style='width:100%;height:100%;' scroll-with-animation scroll-into-view='{{cityListId}}'>
<view class='city_locate' data-types='locate' catchtap='cityTap'>
<!-- <text class='city_locate_title'>自动定位</text>
<text class='city_locate_text' style='{{!locateCity&&"color:#33b9ff;"}}'>{{locateCity||'点击定位'}}</text> -->
<view class="slecity">
<image src='{{url}}bicon_01x.png'></image>
</view>
<view>{{currentCity}}</view>
</view>
<!-- <view class='national' data-types='national' catchtap='cityTap'>全国</view> -->
<view class='new_city'>
<view class='new_city_title'>历史访问城市</view>
<view class='new_city_box'>
<view class="nodata" wx:if="{{history_list.length==0}}">暂无数据</view>
<block wx:else>
<text class='new_city_text' wx:for='{{history_list}}' wx:key='this' data-types='new' catchtap='cityTaphistory' data-val='{{item}}'>{{item}}</text>
</block>
</view>
</view>
<view class='new_city'>
<view class='new_city_title'>热门城市</view>
<view class='new_city_box'>
<text class='new_city_text' wx:for='{{hot_list}}' wx:key='this' data-types='new' catchtap='cityTaphot' data-val='{{item}}'>{{item}}</text>
</view>
</view>
<view class='city_list_box'>
<block wx:for='{{citylist}}' wx:key='this' wx:for-item='letterItem' wx:for-index='letterIndex'>
<view class='city_first_letter' id='{{letterItem.letter}}'>{{letterItem.letter}}</view>
<text class='city_name' wx:for='{{letterItem.data}}' wx:key='this' data-types='list' catchtap='cityTap' data-index='{{index}}' data-val='{{item}}'>{{item.cityName}}</text>
</block>
</view>
</scroll-view>
</view>
<view class='city_right'>
<text class='letter_item' wx:for='{{letter}}' wx:key='this' catchtap='letterTap' data-item='{{item}}'>{{item}}</text>
</view>
</view>