优化城市定位
This commit is contained in:
@ -20,7 +20,7 @@
|
|||||||
<view class="mt-52rpx mx-30rpx">
|
<view class="mt-52rpx mx-30rpx">
|
||||||
<view class="text-[#333] leading-42rpx text-30rpx font-bold">当前定位</view>
|
<view class="text-[#333] leading-42rpx text-30rpx font-bold">当前定位</view>
|
||||||
<view class="mt-40rpx">
|
<view class="mt-40rpx">
|
||||||
<view class="bg-[#F8F9FA] rounded-28rpx w-162rpx h-56rpx text-[#606266] flex items-center justify-center">
|
<view class="bg-[#F8F9FA] rounded-28rpx w-162rpx h-56rpx text-[#606266] flex items-center justify-center" @click="City.handleInitDefaultCity" >
|
||||||
<wd-img width="28rpx" height="28rpx" :src="`${OSS}icon/icon_location2.png`"></wd-img>
|
<wd-img width="28rpx" height="28rpx" :src="`${OSS}icon/icon_location2.png`"></wd-img>
|
||||||
<view class="text-26rpx text-[#606266] leading-36rpx">{{ city || LOCATION_DEFAULT_CITY }}</view>
|
<view class="text-26rpx text-[#606266] leading-36rpx">{{ city || LOCATION_DEFAULT_CITY }}</view>
|
||||||
</view>
|
</view>
|
||||||
@ -98,6 +98,16 @@
|
|||||||
// uni.setStorageSync(LOCATION_LNG_KEY, item.longitude)
|
// uni.setStorageSync(LOCATION_LNG_KEY, item.longitude)
|
||||||
uni.setStorageSync(LOCATION_CITY_KEY, item.name)
|
uni.setStorageSync(LOCATION_CITY_KEY, item.name)
|
||||||
router.navigateBack()
|
router.navigateBack()
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化默认城市
|
||||||
|
*/
|
||||||
|
handleInitDefaultCity: () => {
|
||||||
|
City.handleChooseCity({
|
||||||
|
id: 0,
|
||||||
|
city: '嘉兴市'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user