iphon6 下页面滚动事件,报错Illegal invocation

发布于 8 年前作者 jie369953 次浏览最后编辑 8 年前来自 issues
onLoad() {
  this.scrollFunc = throttle(this.scrollHandle, 300);
},
onPageScroll(e) {
  this.scrollFunc(e);
},
methods: {
  scrollHandle() {
    // top是距离视窗顶部的高度
    if (this.loading || !this.callback) return;
    const query = wx.createSelectorQuery();
    query.select('.lazyWrap').boundingClientRect();
    query.exec((res) => {
      const top = Array.isArray(res) && res[0] && res[0].top;
      if (top < this.height) {
        this.callback();
      }
    });
  },
}

ios:10.0.1

设备iphone6

微信:7.0.3

小程序页面上的onPageScroll方法,报错Illegal invocation。 从2019.9.13号开始出现这个错误,之前没有遇到。

3 回复
luojie
luojie1 楼6 年前

是微信爬虫导致的

huangping
huangping2 楼6 年前

麻烦提供能复现问题的代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

gang32
gang323 楼6 年前

发现有新问题的,老版本是正常的 建议降级到稳定版。开发版官方也说过。是做新能力实验的,出新问题很正常。开发建议用稳定版