在需要上拉加载的页面的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芯片开发光刻机
半导体技术突破
7
文件名:【uniapp小程序-上拉加载】,多普达钻石
【uniapp小程序-上拉加载】
同类推荐
-

【QGIS入门实战精品教程】10.2:QGIS中DEM三维显示方法,8600gts
查看 -

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

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

【RPC】gRPC 安装及使用,heyjuliet
查看 -

【React】03-React面向组件编程2,索尼爱立信k800(索尼爱立信java)
查看 -

【Redis】Bitmap 使用及应用场景,华硕n450
查看 -

【Redis】springboot整合redis(模拟短信注册),qq机票(redis实现短信验证码)
查看 -

【Redis】使用Docker镜像配置集群时的Operation timed out问题,htc x720d one xc
查看 -

【Redis】使用rpm包安装redis,ipad2怎么上网(redis rpm安装)
查看