小程序怎么获取绑定公众号的文章并通过web-view展示呢?
小程序怎么获取绑定公众号的文章并通过web-view展示呢?How does the applet get the articles bound to the official account and display them through web-view?
小程序怎么获取绑定公众号的文章并通过web-view展示呢?小程序怎么获取绑定公众号的文章并通过web-view展示呢?
How can a small program get the article binding the official account and display it through web-view?
回答:
复制公众号文章的链接,然后放到web-view src中。
注意:webview 指向网页的链接。可打开关联的公众号的文章,其它网页需登录小程序管理后台配置业务域名。
参考文章链接:https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html
链接为公众号文章网址
<web-view src="https://mp.weixin.qq.com/xx"></web-view>
1.公众号关联小程序
2.公众号打开文章 右上角复制链接(如果需要多篇文章展示可以出个接口 返回文章地址数组)
3.小程序内使用webview展示即可