|
|
|
@ -487,14 +487,14 @@ export default {
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
loadSelectedCityFromCache() {
|
|
|
|
loadSelectedCityFromCache() {
|
|
|
|
// 假设缓存中的键名为 'selectedCity'
|
|
|
|
// 假设缓存中的键名为 'selectedCity'
|
|
|
|
|
|
|
|
return new Promise((reso, rej) => {
|
|
|
|
const cachedCity = uni.getStorageSync("selectedCity");
|
|
|
|
const cachedCity = uni.getStorageSync("selectedCity");
|
|
|
|
console.log("this.selectedCity", this.selectedCity);
|
|
|
|
console.log("this.selectedCity", this.selectedCity);
|
|
|
|
console.log("this.selectedCity", cachedCity);
|
|
|
|
console.log("this.selectedCity", cachedCity);
|
|
|
|
if (cachedCity && this.selectedCity != cachedCity) {
|
|
|
|
if (cachedCity && this.selectedCity != cachedCity) {
|
|
|
|
this.selectedCity = cachedCity;
|
|
|
|
this.selectedCity = cachedCity;
|
|
|
|
}
|
|
|
|
|
|
|
|
return new Promise((reso, rej) => {
|
|
|
|
|
|
|
|
reso();
|
|
|
|
reso();
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
checkScroll() {
|
|
|
|
checkScroll() {
|
|
|
|
|