|
@@ -106,18 +106,23 @@ export default {
|
|
|
], // 商家列表
|
|
|
businessValue: 'jd',
|
|
|
catId: '',
|
|
|
- cateList: [] // 分类列表
|
|
|
+ cateList: [], // 分类列表
|
|
|
+ numPositionY: 0 // BS纵轴坐标
|
|
|
}
|
|
|
},
|
|
|
activated () {
|
|
|
if (!this.$route.meta.isUseCache) {
|
|
|
this.businessValue = this.sourceList[0].value
|
|
|
this.catId = ''
|
|
|
+ this.numPositionY = 0
|
|
|
this.fetchCateList()
|
|
|
} else {
|
|
|
- if (this.$refs.myMain && this.$refs.myMain.scroll) {
|
|
|
- this.$refs.myMain.scroll.refresh()
|
|
|
- }
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (this.$refs.myMain.scroll) {
|
|
|
+ this.$refs.myMain.scroll.refresh()
|
|
|
+ this.$refs.myMain.scroll.scrollTo(0, this.numPositionY)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
setTimeout(() => {
|
|
|
this.$refs.fbtBusinessList.resize()
|
|
@@ -157,6 +162,7 @@ export default {
|
|
|
if (['CategoryDetail'].findIndex(item => item === to.name) > -1) {
|
|
|
from.meta.isUseCache = true
|
|
|
}
|
|
|
+ this.numPositionY = this.$refs.myMain.scroll ? this.$refs.myMain.scroll.y : 0
|
|
|
next()
|
|
|
}
|
|
|
}
|