diff --git a/pages/cloud/haveFun.vue b/pages/cloud/haveFun.vue index a4f3647..c7f24d7 100644 --- a/pages/cloud/haveFun.vue +++ b/pages/cloud/haveFun.vue @@ -208,7 +208,8 @@ export default { // 后端接口结构需要调整下,需要补充总页数,前端可判断当前页数大于等于总页数则不发送网络请求 if(this.isNext) { this.page++ - this.fetchList() + const random = this.randomSeed ? 1 : 0 + this.fetchList(random, this.randomSeed) } }, onLoad() { @@ -246,6 +247,7 @@ export default { handleRefresh() { uni.showLoading() this.page = 1 + this.hotelList = [] this.fetchList(1, this.randomSeed) }, toTown(town) { @@ -283,7 +285,7 @@ export default { if (this.typeIndex === index) return this.typeIndex = index - + this.randomSeed = null this.currType = index === -1 ? {} : this.typeList[index] this.name = '' this.search() @@ -322,7 +324,6 @@ export default { if (success) { if(random === 1) { this.randomSeed = msg - this.hotelList = [] } for (let i = 0; i < data.length; i++) { const cover = data[i].cover