在需要上拉加载的页面的page.json上添加红框框里面的
onReachBottom() {if(this.commentCurrent<this.commentTotal){this.commentCurrent += 1;this.commentList();this.status = 'loading';}else{this.status = '';}},methods:{commentList(){let params = {courseid:this.courseid,page:this.commentCurrent}commentList(params).then((res)=>{let {code,list,numpage} = resif(code==0){//如果页数>1,需要拼接返回的数据if (this.commentCurrent > 1) {list = [...this.commentData, ...list];}this.commentData = listthis.commentTotal = numpageuni.stopPullDownRefresh(); //拿到数据后,停止下拉刷新this.status = '';}})},}【uniapp小程序-上拉加载】,多普达钻石(uniapp实现上拉加载更多)
cpugpu芯片开发光刻机
半导体技术突破
9
文件名:【uniapp小程序-上拉加载】,多普达钻石
【uniapp小程序-上拉加载】
同类推荐
-

【QML】Qt设置USB免驱相机曝光时间(Linux系统)UVC,乐视c1
查看 -

【Qt之QString】去除“字符“或替换“字符“小技巧,3g泡泡
查看 -

【Qt之元对象系统】,夏新大v进步版(qt 元对象系统)
查看 -

【Qt开发流程】之拖放操作1-介绍,geak eye
查看 -

【Qt进阶之自定义控件】使用QListWidget实现自定义Item效果,elixir内存
查看 -

【REPERTOIRE】Rastaman Vibration,跨越物流查单
查看 -

【RK3399Pro学习笔记】十八、点亮LED灯(python、C语言、bash),hx1(点亮led灯的程序代码)
查看 -

【RabbitMQ】RabbitMQ整合SpringBoot案例,戴尔m15x(戴尔 m15)
查看 -

【React-Router】路由导航,微星780g主板(微星7808主板)
查看