加载中 ...
首页 > 新闻资讯 > 经验心得 正文

About 微信小程序web-view component embedded h5 specific configuration process

2019-07-13 01:40:14 来源:沈阳小程序开发 作者:沈阳软件开发

 

前言:

小程序 step by step update iteration, although the pit is constantly, but overall it is more and more powerful, today we will talk about the web-view component of 小程序, I believe many friends with company business have stepped on the pit, but Since web-view does not support personal types, there are many friends who can't get started, but it doesn't matter. Let me briefly talk about how to embed h5 in web-view. How to configure it?

### First, a brief introduction to web-view, friends who have seen the official api can automatically ignore the ignore, go directly --- configuration steps ---

功能介绍

The web-view component is a container that can be used to host web pages and will automatically spread the entire 小程序 page. Similar to Frame, Iframe, Frameset tags, but for the moment, web-view still lacks flexibility, but I believe many people are already satisfied. (If you have to vomit, I just want to say that web-view is not mys. Time.not to mention, a bitter tear)

使用及后期配置限制问题个人类型与海外类型的小程序暂不支持使用。js-sdk接口限制(具体请参考 官方api )。每个页面只能有一个< web-view />。最多可以添加20个业务域名。一年只可修改50次业务域名。

web-view

090912zlylcj0yee7vjdvd.jpg

示例代码

配置步骤 1. 配置业务域名 2. 选择基础库

① --- 配置业务域名

090912nho0gnib94x4i4xz.jpg

如下图:

090912dya9kg759kzy9w9w.jpg

090912bgyhhoecczikkhbo.jpg

Design 软件

ad.jpg

② --- 选择基础库

This step is the easiest, but it is really easy for many friends to ignore (cough.), developer tools--> details settings--> select version 1.6.4 and above (currently only supported to 1.6.4).

xx
如下图:

090912kl9l2s9zbli29izy.jpg

总结:

以上是web-view的简单配置过程。已经给出了大多数内容为小程序的官方api。在这里,配置过程的步骤进一步详细,并变得更加流行,但如果你需要在h5做一些事情在页面上.看看官方的例子:快速跟踪

&LT; script type='text/javascript'src='https://res.wx.qq.com/open/js/jweixin-1.3.0.js'>脚本&GT; //javascript wx.miniProgram.navigateTo({url:'/path/to/page'})//这个包可以跳过.

(注意:如果遇到调试工具正常启动web-view,手机微信无法打开,不用担心,升级微信版本,实际项目应该与较低版本兼容。)

END

第一篇掘金文,希望大家多多支持和包涵,也欢迎大家吐槽评论...更希望能够认识更多的良师益友,以后会陆续分享一些自己遇到的一些问题或者是一些好玩的东西,多谢...

“沈阳软件公司”的新闻页面文章、图片、音频、视频等稿件均为自媒体人、第三方机构发布或转载。如稿件涉及版权等问题,请与

我们联系删除或处理,客服QQ:55506560,稿件内容仅为传递更多信息之目的,不代表本网观点,亦不代表本网站赞同

其观点或证实其内容的真实性。