onPullDownRefresh
发布于 6 年前 作者 gkang 10933 次浏览 来自 问答

ios和安卓真机测试下拉空白都不恢复,请问这代码有什么毛病?

  /**

* 页面相关事件处理函数–监听用户下拉动作

*/

  onPullDownRefresh: function () {

    var that = this;

    wx.request({

      url: config.userUrl + ‘&c=getuser’,

      data: {

        uid: that.data.uid

      },

      method: ‘POST’,

      header: {

        ‘Content-Type’: ‘application/x-www-form-urlencoded’

      },

      success: function (res) {

        if (res.statusCode == 200) {

          that.setData({

            info: res.data,

          });

        }

      },

      complete: function () {

        wx.stopPullDownRefresh;

      }

    })

  }

app.json里是这样的

  “window”: {

    “backgroundTextStyle”: “light”,

    “navigationBarBackgroundColor”: “#2984cd”,

    “navigationBarTitleText”: “titie”,

    “navigationBarTextStyle”: “#fff”,

    “enablePullDownRefresh”: true

  }

2 回复

 wx.stopPullDownRefresh()

内容是可以正常加载的

回到顶部