第一种:onReachBottomthis
第二种:使用scroll-view组件spa
<scroll-view scroll-y="true" bindscrolltolower="bindMore" style="height:450px"> <view class="all-class-title">班级列表</view> <view bindtap="onChoice"> <view class="class-name all-class-title-list" wx:for="{{state.list_ten}}" data-clazzName="{{item.clazzName}}" data-id="{{item.id}}">{{item.clazzName}} </view> <view wx:if="{{state.bottom}}">正在加载</view> </view> </scroll-view>
bindMore(){ this.setState({bottom:true}) //发送请求 }
<scroll-view scroll-y="true" lower-threshold="400" bindscrolltolower="bindMore" style="height:450px"> </scroll-view>
以上仅为我的想法,若有不一样看法请评论哦code