基本交互逻辑(一共铁子们参考)
<template>
<view class="citysIndex" v-if="update">
<MyNav title="请选择期望城市" bgColor="#ffffff" :backIcon="true"></MyNav>
<scroll-view :scroll-into-view="scrollTop" :scroll-y="true" style="height: 100%;">
<view class="citysHead">
<uni-search-bar v-model="searchValue" placeholder="请输入城市名、拼音或是首字母查询" :cancelButton="false" bgColor="#EEEEEE" @input="search" />
<!-- 热门城市 -->
<uni-list v-if="searchList.length > 0">
<uni-list-item clickable @click="handelCityClickFn(item)" v-for="(item,index) in searchList" :key="index" :title="item.name" :rightText="item.code" />
</uni-list>
<view v-if="!searchList.length" class="citysHot">
<view class="citysTitle">
<label>热门城市</label>
</view>
<view class="citysHot-list">
<!-- <a v-for="(v,i) in hotCitys" @click="checkCity(v.name)"> :class="[q.checked?'checkedBtn':'']" -->
<label @click="checkCity(v)" v-for=