|
|
@@ -79,24 +79,6 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 热门城市 -->
|
|
|
- <view class="hot-section">
|
|
|
- <view class="section-title">
|
|
|
- <text class="section-title-text">热门城市</text>
|
|
|
- </view>
|
|
|
- <view class="hot-cities">
|
|
|
- <view
|
|
|
- v-for="(city, index) in hotCities"
|
|
|
- :key="index"
|
|
|
- class="hot-city-item"
|
|
|
- :class="{ 'selected': isSelected(city) }"
|
|
|
- @click="selectHotCity(city)"
|
|
|
- >
|
|
|
- <text class="hot-city-text">{{ city.cityName }}</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
<!-- 省份城市列表 -->
|
|
|
<view class="province-section">
|
|
|
<view class="section-title">
|
|
|
@@ -199,18 +181,7 @@ export default {
|
|
|
selectedCity: null,
|
|
|
expandedProvinces: [],
|
|
|
scrollIntoView: '',
|
|
|
- recentCities: [],
|
|
|
- hotCities: [
|
|
|
- { provinceCode: '530000', cityCode: '530100', provinceName: '云南省', cityName: '昆明市', label: '云南省 昆明市' },
|
|
|
- { provinceCode: '110000', cityCode: '110100', provinceName: '北京市', cityName: '北京市', label: '北京市' },
|
|
|
- { provinceCode: '310000', cityCode: '310100', provinceName: '上海市', cityName: '上海市', label: '上海市' },
|
|
|
- { provinceCode: '440000', cityCode: '440100', provinceName: '广东省', cityName: '广州市', label: '广东省 广州市' },
|
|
|
- { provinceCode: '440000', cityCode: '440300', provinceName: '广东省', cityName: '深圳市', label: '广东省 深圳市' },
|
|
|
- { provinceCode: '330000', cityCode: '330100', provinceName: '浙江省', cityName: '杭州市', label: '浙江省 杭州市' },
|
|
|
- { provinceCode: '320000', cityCode: '320100', provinceName: '江苏省', cityName: '南京市', label: '江苏省 南京市' },
|
|
|
- { provinceCode: '510000', cityCode: '510100', provinceName: '四川省', cityName: '成都市', label: '四川省 成都市' },
|
|
|
- { provinceCode: '420000', cityCode: '420100', provinceName: '湖北省', cityName: '武汉市', label: '湖北省 武汉市' }
|
|
|
- ]
|
|
|
+ recentCities: []
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -336,14 +307,6 @@ export default {
|
|
|
this._$emit('onConfirm')
|
|
|
this.close()
|
|
|
},
|
|
|
- // 选择热门城市
|
|
|
- selectHotCity(city) {
|
|
|
- this.selectedCity = city
|
|
|
- this.saveRecentCity(city)
|
|
|
- // 自动确认并关闭
|
|
|
- this._$emit('onConfirm')
|
|
|
- this.close()
|
|
|
- },
|
|
|
// 切换省份展开状态
|
|
|
toggleProvince(index) {
|
|
|
const expandIndex = this.expandedProvinces.indexOf(index)
|