Fix(寻趣味):滚动底部需请求接口加载下一页数据

This commit is contained in:
lifizer
2024-04-01 22:10:02 +08:00
parent a8f701b614
commit 2a98da3ce8
+9 -1
View File
@@ -68,7 +68,10 @@
<view class="text">暂无数据</view>
</view>
</view>
<goo-skeleton v-else />
<goo-skeleton
v-else
:show-avatar="false"
/>
</view>
</view>
</template>
@@ -102,6 +105,11 @@ export default {
return arr
}
},
onReachBottom() {
// 后端接口结构需要调整下,需要补充总页数,前端可判断当前页数大于等于总页数则不发送网络请求
this.page++
this.fetchList()
},
onLoad() {
this.getMapData()
getHotelTypeList().then(({data}) => {