diff --git a/pages/cloud/haveFun.vue b/pages/cloud/haveFun.vue index f6e623e..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) { @@ -270,7 +281,7 @@ export default { //padding-top: 120rpx; .top-box { - padding: 32rpx 0 20rpx; + padding: 32rpx 0 0rpx; background: #f5f5f5; .search-box { @@ -371,7 +382,7 @@ export default { padding: 0 20rpx; background-color: #f5f5f5; .title { - padding: 20rpx 0; + padding: 0 0 20rpx; .img { display: block; height: 48rpx; diff --git a/pages/order/MyOrder/index.vue b/pages/order/MyOrder/index.vue index d2704df..b825034 100644 --- a/pages/order/MyOrder/index.vue +++ b/pages/order/MyOrder/index.vue @@ -1,5 +1,5 @@