小程序 web-view

前提:个人类型的小程序暂不支持使用。(信源: https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html

使用姿势:

<web-view  src="http://g8up.com/suanshu/"></web-view>
  • src 中的域名需要设置为“业务域名”
  • 配置业务域名:管理后台-开发-开发管理-开发设置中添加( https://mp.weixin.qq.com/wxamp/devprofile/get_profile
  • 业务域名强制走 https 协议,且会要求上传一个文本到根目录作为验证

[恰饭]教程推荐:

不会 js 断点调试?看这里, 一碗面的成本,掌握知识和姿势~


原文地址:https://www.cnblogs.com/duxing/p/14448232.html