Fix:4032 【商城小程序】查看资讯图片会刷新返回到店铺顶部
This commit is contained in:
@@ -587,7 +587,8 @@ export default {
|
||||
isLoadInfoListSuccess: false,
|
||||
pageKeyId: '',
|
||||
shareImg: '',
|
||||
videoPlayers: []
|
||||
videoPlayers: [],
|
||||
isView: false
|
||||
}
|
||||
},
|
||||
// 必须在页面加 onPageScroll(e){} ,才能滑动显示背景
|
||||
@@ -669,16 +670,21 @@ export default {
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
console.log(this.infoArray);
|
||||
|
||||
if (!this.isLoad) {
|
||||
return
|
||||
}
|
||||
this.fetchInnDetail()
|
||||
if(this.isView) return
|
||||
if(this.activeIndex === 1) {
|
||||
this.fetchInnInfoList()
|
||||
return
|
||||
}
|
||||
if (uni.getStorageSync('hotelInfoPublish') === '1') {
|
||||
this.fetchInnInfoList()
|
||||
return
|
||||
}
|
||||
this.fetchInnDetail()
|
||||
},
|
||||
watch: {
|
||||
activeIndex: {
|
||||
@@ -854,6 +860,7 @@ export default {
|
||||
}
|
||||
uni.$u.debounce(() => {
|
||||
hotelNewsView({ id: item.id }).finally(() => {
|
||||
this.isView = true
|
||||
this.infoArray.map(info => {
|
||||
if (info.id === item.id) {
|
||||
info.pv += 1
|
||||
@@ -1002,6 +1009,7 @@ export default {
|
||||
_this.isLoad = true
|
||||
}
|
||||
}).finally(() => {
|
||||
this.isView = false
|
||||
uni.stopPullDownRefresh()
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user