You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

46 lines
2.0 KiB

<!--pages/chooseArea/chooseArea.wxml-->
<view class="container">
<view class="topBox">
<view class="searchBox">
<view class="searchBox_left">
<image class='searchImg' src="/images/icon-search.png"></image>
<input type="text" value="{{searchKey}}" placeholder="请输入城市名称" bindinput="searchInput"/>
<view wx:if="{{searchKey}}" bindtap="cleardata">
<image class="cancel" src="/images/delete.png" mode=""></image>
</view>
</view>
<view class="searchBox_btn" bindtap="search">搜索</view>
</view>
<view class="area">
<view class="area_left">
<text>当前位置:</text>
<view class="area_left_item" wx:if="{{choose_area.length>0}}">
<text wx:for="{{choose_area}}" wx:key="index">{{item.G_CName}}</text>
</view>
<view wx:else>{{region.city}}</view>
</view>
<view class="area_right" bindtap="seeAreaClick">
<text>切换区县</text>
<image src="/images/xjt.png"></image>
</view>
</view>
<view class="areaItemBox" wx:if="{{seeAreaFlag}}">
<view class="areaItem" wx:for="{{area_list}}" wx:key="index" data-item="{{item}}" bindtap="clickArea">{{item.G_CName}}</view>
</view>
</view>
<scroll-view class="content" scroll-y="true" bindscroll="contentScroll" scroll-into-view="{{scrollKey}}" scroll-with-animation="true">
<view class="list-table" wx:for="{{city_list}}" id="{{index}}" wx:key="index">
<view class="listTitle" wx:if="{{!filterKey}}">{{index}}</view>
<view wx:for="{{city_list[index]}}" wx:key="index">
<view class="list" wx:if="{{!item.G_CName.includes(filterKey)}}" wx:key="index" data-item="{{item}}" bindtap="clickArea">{{item.G_CName}}</view>
</view>
</view>
<view class="listRight" wx:if="{{!filterKey}}">
<view wx:for="{{city_list}}" wx:key="key" class="{{index == titleKey?'active': ''}}" data-key="{{index}}" bindtap="changeTitle">{{index}}</view>
</view>
</scroll-view>
</view>