小程序页面下拉刷新后不回弹
发布于 5 年前 作者 zzhong 4588 次浏览 来自 问答

小程序页面下拉刷新后,在IPhone6和IPhone6s上不回弹,而且已经试过在.json文件中设置过"backgroundColor": “#f0f0f0”,也在onPullDownRefresh中调用了wx.stopPullDownRefresh(),这两种操作都没有效果,请官方及时解决。

5 回复

initData() {

    wx.showLoading({

      title: ‘加载中’

    })

    app.ajax(this.data.postData).then((res) => {

      wx.hideLoading()

      wx.hideNavigationBarLoading() //在标题栏中隐藏加载

      wx.stopPullDownRefresh()

      if (res.success) {

 

      } else {

        this.wetoast.toast({

          title: res.errMsg,

          duration: 1500

        })

      }

    }, () => {

      wx.hideLoading()

      this.wetoast.toast({

        title: ‘服务器错误,请稍后重试’

      })

    })

  },

我的iphone6s回弹了 但是没有进去函数

这是我的代码,经过实测,真机上还是出现了页面不回弹。

onPullDownRefresh: function() {

    wx.showNavigationBarLoading() //在标题栏中显示加载

    wx.showLoading({

      title: ‘加载中’

    })

    setTimeout(() => {

      let obj = this.data.postData

      obj.data.pageNum = 0

      this.setData({

        postData: obj

      })

      this.initData()

    }, 1000)

  },

测试有效果,你用错了吧

回到顶部