<!-- <import src="../../utils/wxaSortPicker/wxaSortPicker.wxml" /> -->

<view class="search-w">
    <input class="search-input" bindinput="searchResult" placeholder="输入城市名称进行搜索"></input>
    <view class="result-tip">
        <view class="search-input" wx:for="{{resultTip}}" data-city="{{item.name}}" bindtap="handleCityClick">{{
            item.name }}</view>
    </view>
</view>

<view class="location-w">
    <view class="city-label">默认城市</view>
    <view class="search-input" bindtap="selectLocation">
        <text>{{ city }}</text>
        <!-- <view class="refresh-btn " animation="{{animation}}" catchtap="getLocation"></view> -->
    </view>
</view>

<!-- <view class="citys-w">
    <view class="city-label">全部城市（按首字母顺序）</view>
    <view wx:for="{{citys}}">
        <view class="city-label">{{alphabet[item.alphabetIndex]}}</view>
        <view class="citys-container">
            <view data-city="{{city.name}}" bindtap="handleCityClick" wx:for="{{item.citys}}" wx:for-item="city">{{city.name}}</view>
        </view>
    </view>
</view> -->
<view class="histroy-city">
    <view class="history-title">
        <view class="city-label">浏览记录</view>
        <text bindtap="remove_historyCity" class="hitstroy-destory">清空</text>
    </view>

    <view class="histroy-box">
        <view class="history-item" data-city="{{item}}"
                            bindtap="handleCityClick" wx:for="{{historyCity}}">{{item}}</view>
        <!-- <view class="history-item">纽约</view>
        <view class="history-item">纽约</view> -->
    </view>
</view>

<view class="city-label">全部城市</view>
<view class="select-box" style="height:{{sliderHeight}}px;">
    <view class="btn_jump">
        <view class="btn_item {{apl_index ==item.alphabetIndex ?'active':''}}" bindtap='jumpTo' data-index="{{item.alphabetIndex}}"  data-opt="item{{idx}}" wx:for="{{new_cities}}" wx:for-index="idx">
            {{alphabet[item.alphabetIndex]}}</view>
    </view>
    <view class="loacation-box">
        <view class="states-side">
            <view class="states-item {{state_id==0 ? ' active':''}}" data-id="{{0}}" bindtap="getCities">
                全国
            </view>
            <view bindtap="getCities" data-id="{{item.id}}" wx:for="{{states}}"
                class="states-item  {{state_id==item.id ? ' active':''}}">
                {{item.name}}
            </view>
        </view>
        <view class="city-side">


            <scroll-view bindscroll="onPageScroll" class="jump_list" scroll-into-view="{{toView}}" scroll-y="true"
                scroll-with-animation="true">
                <view wx:for="{{new_cities}}" wx:for-index="idx">
                    <!-- <view class="city-label" id="item{{idx}}">{{alphabet[item.alphabetIndex]}}</view> -->
                    <view class="city-label-apl" id="item{{idx}}">
                        {{alphabet[item.alphabetIndex]}}</view>
                    <view class="citys-container">

                        <view class="city-item {{city==city_item.name ? 'active':''}}" data-city="{{city_item.name}}"
                            bindtap="handleCityClick" wx:for="{{item.citys}}" wx:for-item="city_item">
                            {{city_item.name}}
                            <!-- {{apl_index}}
                            {{item.alphabetIndex}}
                            {{apl_index ==item.alphabetIndex}} -->

                        </view>
                    </view>
                </view>
            </scroll-view>
        </view>

    </view>
</view>