onReachBottom 这个是啥?
发布于 6 年前 作者 yankong 17062 次浏览 来自 问答

报错文案:

Do not have onReachBottom handler in current page: pages/dashboard/index. Please make sure that onReachBottom handler has been defined in pages/dashboard/index, or pages/dashboard/index has been added into app.json

这个事件没有文案,也没有相关说明,但是小程序里面就会报这个错误,请问怎么解决

3 回复

app.json内容{

  “pages”: [

    “pages/loading/index”,

    “pages/dashboard/index”,

    “pages/dashboard/appGuide”,

    “pages/user/fail/index”,

    “pages/user/login/index”,

    “pages/shopSwitch/index”,

    “pages/payQrCode/index”,

    “pages/createProductAndSale/index/index”,

    “pages/createProductAndSale/name/name”,

    “pages/createProductAndSale/model/model”,

    “pages/createProductAndSale/standard/standard”,

    “pages/createProductAndSale/propertie/propertie”,

    “pages/createProductAndSale/brand/list”,

    “pages/salesOrder/createSalesOrder/createSalesOrder”,

    “pages/salesOrder/productList/productList”,

    “pages/salesOrder/settlement/settlement”,

    “pages/salesOrder/settlement/chooseAddress/chooseAddress”,

    “pages/salesOrder/settlement/memo/memo”,

    “pages/message/index”,

    “pages/saleListManage/list”,

    “pages/saleDetail/detail”,

    “pages/saleDetail/showRules”

  ],

  “window”: {

    “backgroundTextStyle”: “light”,

    “navigationBarBackgroundColor”: “#fff”,

    “navigationBarTitleText”: “智能销售单”,

    “navigationBarTextStyle”: “black”

  }

}

是不是我在json里面配置了

  “enablePullDownRefresh”:true,

的原因?

但是onReachBottom是底部上拉事件啊

https://mp.weixin.qq.com/debug/wxadoc/dev/framework/app-service/page.html

onReachBottom是Page中注册的一个方法,在页面滚动到最底端的时候触发该方法的回调

如果不确定因为什么原因导致报这个错误,可以将你的app.json以及对应的页面js代码贴出来,这有助于定位问题

回到顶部