https://developers.weixin.qq.com/miniprogram/dev/component/official-account.html
公众号关注组件 在哪个页面添加代码,怎么调试啊、
在合适的位置加如下代码
<official-account></official-account>
1、小程序关联公众号
2、并启用关注公众号组件
3、开发工具测试,编译选择二维码编译,然后选择小程序二维码
公众号组件不能写在web-view里面。
这个组件可以通过更改小程序编译条件为扫码进入。