From 27d4727f89d8eb51def933e810bd1f0b478f781a Mon Sep 17 00:00:00 2001 From: modendeveloper Date: Thu, 26 Sep 2024 21:13:18 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A2416=20=E3=80=90=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E3=80=91=E5=AF=BB=E8=B6=A3=E5=91=B3?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E5=BA=97=E9=93=BA=E8=AF=A6=E6=83=85=E5=90=8E?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=EF=BC=8C=E5=BA=94=E5=81=9C=E7=95=99=E5=9C=A8?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E5=88=B7=E5=88=B0=E7=9A=84=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E7=8E=B0=E5=9C=A8=E6=AF=8F=E6=AC=A1=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E9=83=BD=E4=BC=9A=E5=88=B7=E6=96=B0=E5=88=B0=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E9=A1=B6=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/cloud/haveFun.vue | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pages/cloud/haveFun.vue b/pages/cloud/haveFun.vue index 759ad0e..d2e856c 100644 --- a/pages/cloud/haveFun.vue +++ b/pages/cloud/haveFun.vue @@ -162,6 +162,7 @@ export default { }, onShow() { + const memCityName = uni.getStorageSync('cityName') this.page = 1 this.currType = {} this.typeIndex = 0 @@ -171,13 +172,23 @@ export default { this.currType = data[this.typeIndex] this.getMapData() }) - const memCityName = uni.getStorageSync('cityName') if (memCityName.length) { this.cityName = memCityName uni.removeStorageSync('cityName') this.name = '' } }, + watch: { + cityName: { + handler(value) { + if(value) { + this.search() + } + }, + immediate: true, + deep: true + } + }, methods: { goCity() { uni.navigateTo({ @@ -197,7 +208,7 @@ export default { if(!this.cityName) { this.cityName = address[1].data.result.ad_info.city } - this.search() + // this.search() } }, tapType(index) {