How to render too much data requested by Mini Program?

when I load more at the bottom of Mini Program"s scroll, if I load a lot of data pages, I will report an error

clipboard.png

clipboard.png
this is the requested data, but it was misreported as soon as it exceeded 100 entries. I think everyone else"s is fine. It"s really depressing
success (res) {

.
      console.log(res)
      wx.hideLoading()
      var list = self.data.list
      if (JSON.stringify(res.data.data) === "{}") {
      } else {
        var after_id = res.data.data[res.data.data.length - 1].news_id
        wx.setStorageSync("after_id", after_id)
        res.data.data.forEach(function (e) {
          if (JSON.stringify(e.news_images) !== "{}") {
            e.news_images.attachment_content = (JSON.parse(e.news_images.attachment_content)).slice(0, 3)
          }
          e.published_time = utils.getTimeShow(
            utils.edittime(e.published_time)
          );
          list.push(e)
        }) 
        setTimeout(function(){
          self.setData({
            list: list,
          })
        },100)
        console.log(self.data.list)
        wx.hideLoading()
      }
    }

this is my page rendering

< swiper-item wx:for= "{{newlist}}" wx:key= "* this" wx:for-index= "index" >


  <scroll-view scroll-y="true" bindscrolltolower="bindDownLoad"   class="scoll-h" wx:if="{{show}}">
    <swiper class="banner" indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" circular="{{circular}}" duration="{{duration}}" previous-margin="0px" next-margin="0px">
      <block wx:for="{{imgUrls}}" wx:key="*this">
        <swiper-item bindtap="goinfo" data-url="{{item.url}}" class="bannercontent">
            <image src="{{item.image}}" class="slide-image" />
            <view class="title">{{item.title}}</view>
        </swiper-item>
      </block>
    </swiper>
    <view wx:for="{{essencefour}}" wx:key="*this" class="newscontent">
      <view wx:if="{{item.news_type==0}}" class="content" data-id="{{item.news_id}}" bindtap="gonews">
        <view class="newstitle">{{item.news_title}}</view>
        <view class="bom">
          <view>{{item.tag_list[0].tag_name}}  {{item.published_time}}</view>
          <view>{{item.view_num}}
            <image class="viewnum" src="../../img/count.png"></image>
          </view>
        </view>
      </view>
      <view wx:if="{{item.news_type==1}}" class="content oneimg" data-id="{{item.news_id}}" bindtap="gonews">
        <view class="oneimg-bom">
          <view class="oneimg-title">{{item.news_title}}</view>
          <view class="oneimg-bom-bom">
            <view>{{item.tag_list[0].tag_name}}  {{item.published_time}}</view>
            <view>{{item.view_num}}
              <image class="viewnum" src="../../img/count.png"></image>
            </view>
          </view>
        </view>
        <image class="newscover" src="{{item.cover}}"></image>
      </view>
      <view wx:if="{{item.news_type==2}}" class="content moreimg" data-id="{{item.news_id}}" bindtap="gonews">
        <view class="oneimg-title">{{item.news_title}}</view>
        <view class="imgcontent">
          <image wx:for="{{item.news_images.attachment_content}}" wx:key="*this" src="{{item}}" class="newscover"></image>
        </view>
        <view class="oneimg-bom-bom">
          <view>{{item.tag_list[0].tag_name}}  {{item.published_time}}</view>
          <view>{{item.view_num}}
            <image class="viewnum" src="../../img/count.png"></image>
          </view>
        </view>
      </view>
      <view wx:if="{{item.news_type==3}}" class="content oneimg" data-id="{{item.news_id}}" bindtap="gonews">
        <view class="oneimg-bom">
          <view class="oneimg-title">{{item.news_title}}</view>
          <view class="oneimg-bom-bom">
            <view>{{item.tag_list[0].tag_name}}  {{item.published_time}}</view>
            <view>{{item.view_num}}
              <image class="viewnum" src="../../img/count.png"></image>
            </view>
          </view>
        </view>
        <image class="newscover" src="{{item.cover}}"></image>
      </view>
    </view>
    <view wx:for="{{essencethree}}" wx:key="*this" class="newscontent">
      <view wx:if="{{item.news_type==0}}" class="content" data-id="{{item.news_id}}" bindtap="gonews">
        <view class="newstitle">{{item.news_title}}</view>
        <view class="bom">
          <view>{{item.tag_list[0].tag_name}}  {{item.published_time}}</view>
          <view>{{item.view_num}}
            <image class="viewnum" src="../../img/count.png"></image>
          </view>
        </view>
      </view>
      <view wx:if="{{item.news_type==1}}" class="content oneimg" data-id="{{item.news_id}}" bindtap="gonews">
        <view class="oneimg-bom">
          <view class="oneimg-title">{{item.news_title}}</view>
          <view class="oneimg-bom-bom">
            <view>{{item.tag_list[0].tag_name}}  {{item.published_time}}</view>
            <view>{{item.view_num}}
              <image class="viewnum" src="../../img/count.png"></image>
            </view>
          </view>
        </view>
        <image class="newscover" src="{{item.cover}}"></image>
      </view>
      <view wx:if="{{item.news_type==2}}" class="content moreimg" data-id="{{item.news_id}}" bindtap="gonews">
        <view class="oneimg-title">{{item.news_title}}</view>
        <view class="imgcontent">
          <image wx:for="{{item.news_images.attachment_content}}" wx:key="*this" src="{{item}}" class="newscover"></image>
        </view>
        <view class="oneimg-bom-bom">
          <view>{{item.tag_list[0].tag_name}}  {{item.published_time}}</view>
          <view>{{item.view_num}}
            <image class="viewnum" src="../../img/count.png"></image>
          </view>
        </view>
      </view>
      <view wx:if="{{item.news_type==3}}" class="content oneimg" data-id="{{item.news_id}}" bindtap="gonews">
        <view class="oneimg-bom">
          <view class="oneimg-title">{{item.news_title}}</view>
          <view class="oneimg-bom-bom">
            <view>{{item.tag_list[0].tag_name}}  {{item.published_time}}</view>
            <view>{{item.view_num}}
              <image class="viewnum" src="../../img/count.png"></image>
            </view>
          </view>
        </view>
        <image class="newscover" src="{{item.cover}}"></image>
      </view>
    </view>
  </scroll-view>
  <scroll-view  scroll-y="true" bindscrolltolower="bindDownLoad"   wx:if="{{!show}}" class="scoll-h">
    <view wx:for="{{list}}" wx:key="item"  class="newscontent">
      <view wx:if="{{item.news_type==0}}" class="content" data-id="{{item.news_id}}" bindtap="gonews">
        <view class="newstitle">{{item.news_title}}</view>
        <view class="bom">
          <view>{{item.tag_list[0].tag_name}}  {{item.published_time}}</view>
          <view>{{item.view_num}}
            <image class="viewnum" src="../../img/count.png"></image>
          </view>
        </view>
      </view>
      <view wx:if="{{item.news_type==1}}" class="content oneimg" data-id="{{item.news_id}}" bindtap="gonews">
        <view class="oneimg-bom">
          <view class="oneimg-title">{{item.news_title}}</view>
          <view class="oneimg-bom-bom">
            <view>{{item.tag_list[0].tag_name}}  {{item.published_time}}</view>
            <view>{{item.view_num}}
              <image class="viewnum" src="../../img/count.png"></image>
            </view>
          </view>
        </view>
        <image class="newscover" src="{{item.cover}}"></image>
      </view>
      <view wx:if="{{item.news_type==2}}" class="content moreimg" data-id="{{item.news_id}}" bindtap="gonews">
        <view class="oneimg-title">{{item.news_title}}</view>
        <view class="imgcontent">
          <image wx:for="{{item.news_images.attachment_content}}" wx:key="*this" src="{{item}}" class="newscover"></image>
        </view>
        <view class="oneimg-bom-bom">
          <view>{{item.tag_list[0].tag_name}}  {{item.published_time}}</view>
          <view>{{item.view_num}}
            <image class="viewnum" src="../../img/count.png"></image>
          </view>
        </view>
      </view>
      <view wx:if="{{item.news_type==3}}" class="content video" data-id="{{item.news_id}}" bindtap="gonews">
        <image class="videoimg" src="{{item.cover}}"></image>
        <view class="video-bom">
          <view class="video-title">{{item.news_title}}</view>
          <view class="video-bom-bom">
            <view>{{item.tag_list[0].tag_name}}  {{item.published_time}}</view>
            <view>{{item.view_num}}
              <image class="viewnum" src="../../img/count.png"></image>
            </view>
          </view>
        </view>
      </view>
    </view>
  </scroll-view> 
</swiper-item>

I hope there is a boss who can solve the problem

Nov.26,2021

the data set by the official document setData cannot exceed 1024kB at a time. It may be because the amount of data set at one time is too large.

solution: do Filter on the obtained data, and set only the part you need:

pseudo code:

data: {
    listData: []
}
...
var list = ...// 
var listData = list.map(item => {
    var data = {}
    data.name = item.name
    data.value = item.value
    ...// data
    return data
})
this.setData({
    listData: listData
})
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3f60f-2bce0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3f60f-2bce0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?