小程序 this.getOpenerEventChannel is not a function

小程序新出功能,页面跳转后通过事件的发布订阅,实现页面间数据的传递,但我在使用过程中发现个大bug
官方文档
https://developers.weixin.qq.com/miniprogram/dev/api/route/wx.navigateTo.html

this.getOpenerEventChannel is not a function;at  xx/xxx/xxx  page lifeCycleMethod onLoad function

找了半天,原因竟然是 删除了 页面json配置文件的 usingComponents。加上就好了。。。。

{
	"usingComponents": {}
}

还有一点需要注意 基础库要求 2.73 !!!!切记切记,上线记得设置最低版本

在这里插入图片描述
开发工具右上角详情设置基础库
小程序 this.getOpenerEventChannel is not a function_第1张图片

你可能感兴趣的:(微信小程序)