Refactor(首页):首页定位获取逻辑调整为只用于左上角显示之用

This commit is contained in:
lifizer
2026-05-21 17:06:31 +08:00
parent 656c27fdb8
commit e0dd9aa7ed
+5 -4
View File
@@ -716,6 +716,7 @@ export default {
console.timeEnd()
console.log('^^^^^^^^^^^^^^^^获取定位开始')
console.time()
this.getPageData()
this.getLocationData()
},
// 定位失败,重新唤起定位授权
@@ -729,7 +730,7 @@ export default {
const cityName = uni.getStorageSync('locationCityName')
if (cityName) {
this.cityName = cityName
this.getPageData()
// this.getPageData()
}
this.isLocating = true
getLocationPromise().then(mapData => {
@@ -742,16 +743,16 @@ export default {
if (resCityName !== this.cityName) {
this.cityName = address.city
uni.setStorageSync('locationCityName', this.cityName)
this.getPageData()
// this.getPageData()
}
this.isLocating = false
})
} else {
this.isLocating = false
this.getPageData()
// this.getPageData()
}
}).catch(() => {
this.getPageData()
// this.getPageData()
})
},
getPageData() {