Fix:2958 【商城小程序】点击“换一换”,浏览店铺列表出现重复店铺数据
This commit is contained in:
@@ -208,7 +208,8 @@ export default {
|
|||||||
// 后端接口结构需要调整下,需要补充总页数,前端可判断当前页数大于等于总页数则不发送网络请求
|
// 后端接口结构需要调整下,需要补充总页数,前端可判断当前页数大于等于总页数则不发送网络请求
|
||||||
if(this.isNext) {
|
if(this.isNext) {
|
||||||
this.page++
|
this.page++
|
||||||
this.fetchList()
|
const random = this.randomSeed ? 1 : 0
|
||||||
|
this.fetchList(random, this.randomSeed)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@@ -246,6 +247,7 @@ export default {
|
|||||||
handleRefresh() {
|
handleRefresh() {
|
||||||
uni.showLoading()
|
uni.showLoading()
|
||||||
this.page = 1
|
this.page = 1
|
||||||
|
this.hotelList = []
|
||||||
this.fetchList(1, this.randomSeed)
|
this.fetchList(1, this.randomSeed)
|
||||||
},
|
},
|
||||||
toTown(town) {
|
toTown(town) {
|
||||||
@@ -283,7 +285,7 @@ export default {
|
|||||||
|
|
||||||
if (this.typeIndex === index) return
|
if (this.typeIndex === index) return
|
||||||
this.typeIndex = index
|
this.typeIndex = index
|
||||||
|
this.randomSeed = null
|
||||||
this.currType = index === -1 ? {} : this.typeList[index]
|
this.currType = index === -1 ? {} : this.typeList[index]
|
||||||
this.name = ''
|
this.name = ''
|
||||||
this.search()
|
this.search()
|
||||||
@@ -322,7 +324,6 @@ export default {
|
|||||||
if (success) {
|
if (success) {
|
||||||
if(random === 1) {
|
if(random === 1) {
|
||||||
this.randomSeed = msg
|
this.randomSeed = msg
|
||||||
this.hotelList = []
|
|
||||||
}
|
}
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
const cover = data[i].cover
|
const cover = data[i].cover
|
||||||
|
|||||||
Reference in New Issue
Block a user