Wechat applet - pull down and release, it will not go back to the top, leaving a blank space

Solution:

  The occurrence of blanks may be triggered by multiple pull-down events, resulting in too many requests and delays in page response.

  Add the setTimeout event to the onPullDownRefresh event to delay the pull-down refresh event.

  /**
    * Page-related event handlers--listen to user pull-down actions
    */
  onPullDownRefresh: function () {
    wx.stopPullDownRefresh();
    let _This = this;
    let oUInfo = _This.data.oUInfo;
    setTimeout(function(){
      (!oUInfo.unionId) && getApp().getUserData(function (result) {
        _This.setData({
          oUInfo: result
        });
      });

      _This.pullRefresh();
    },10)
  },

  

It is also said that the drop-down action is prohibited, but the event to be processed by the drop-down cannot be processed.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324852073&siteId=291194637