WeChat Mini Programs's pull-up loading problem

The

question is how to trigger onreachBottom? My own result is that
can only trigger onReachBottom, in the case of a scroll bar, so I can only set the height of this page to 110vh so that I can have a scroll bar. Obviously there is a flaw in this place, but I don"t know how to solve it, because if I don"t set it up, I can"t trigger it, or just trigger it once
clipboard.png

.

`onReachBottom:function () {

  console.log("")
  if(this.data.flag){
      wx.showLoading({
          title: "...",
      })
      setTimeout(()=>{
          wx.hideLoading()
      },1500)
      return
  }
  let {options,page}=this.data;
  this.data.page+=1
  this.setData({
      page:this.data.page,
  })
  api.getRents(options.type,this.data.page, (res)=> {
      if(res.data=[]){
          this.setData({
              flag:true
          })
      }
      console.log(res)
      this.setData({
          rents: this.data.rents.concat(res.data),
      })
  })`
  

when the page scrolls to the bottom, view is always at the bottom of the page, so scorll, is no longer triggered, so the outer layer uses view, and the inner layer binds the bindscroll event with sroll-view, using

in the event.
wx.pageScrollTo({
    scrollTop: 0,
    duration: 0
})
Menu