Fix:2416 【商城小程序】寻趣味进入店铺详情后返回,应停留在当前刷到的位置,现在每次返回都会刷新到页面顶部
This commit is contained in:
+13
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user