searchcity.wxml 1.4 KB
<!-- 头部搜索 -->
<view class="tou">
  <view class="head">
    <view class="headmiddle">
      <view class="headmiddleleft">
        <image src="/img/search.png" mode=""></image>
      </view>
      <view class="headmiddleright">
        <input type="text" placeholder="请输入搜索城市" placeholder-class="shuru" bindinput="entercity"/>
      </view>
    </view>
    <view class="search" bindtap="search">搜索</view>
  </view>
</view>

<!-- 当前城市 -->
<view class="city">
    <view class="citytop">当前城市</view>
    <view class="citybox flexone">
      <view class="cityboxitem {{current==true?'selcityactive':''}}" wx:key="" bindtap="selectcurrent">{{currentcity}}</view>
      
    </view>
</view>
<!-- 当前城市 -->
<view class="city">
    <view class="citytop">热门城市</view>
    <view class="citybox flexone">
      <view class="cityboxitem {{sel==index?'selcityactive':''}}" wx:for="{{hotcityarr}}" wx:key="" bindtap="selhotcity" data-cityname="{{item.name}}" data-index="{{index}}" data-id="{{item.id}}">{{item.name}}</view>
      
    </view>
</view>
<!-- 当前城市 -->
<view class="city">
    <view class="citytop">全部城市</view>
    <view class="citybox flexone">
      <view class="cityboxitem {{sel=='index'?'selcityactive':''}}" wx:for="{{cityarr}}" wx:key="" bindtap="selhotcity" data-index="{{index}}" data-cityname="{{item.name}}" data-id="{{item.id}}">{{item.name}}</view>
      
    </view>
</view>