Today, wechat mini program released two major updates

  • Applets embedded web pages
  • Small program can be associated with 500 public numbers

    The support of embedded web pages makes wechat a step closer to becoming a platform worthy of its name from a single App. Hurry to try it.Web-view official document address

    ##### 1, update < wechat developer Tools > to the latest version

    Since web-view component is supported from base library 1.6.4, in the current version of < wechat Developer Tools > click the right ‘details’ button, you can see that only 1.5.4 is supported:
    1509680476207.jpg


    Method A: Tools update directly

    WechatIMG2482.jpeg
    WechatIMG2475.jpeg


    Method B: Download it directlyLatest version of developer toolsThis method is recommended to replace the old version of App. The first method usually takes about 10 minutes and may not be successful. After replacement:

    1509693511467.jpg


    ##### 2. Configure the service domain name (i.e. access whitelist).

    A: Developers log in to the mini program background mp.weixin.qq.com, choose Settings – Development Settings – Service domain name, and add the domain name module

    421D3041-30C1-474C-83FD-C8E375D5DF57.jpeg


    The first time you add a domain name, you need to download the verification file to the directory specified on your server. You cannot add the domain name without this operation (this requires your site to support HTTPS).

    B: Add a domain namePassport.newgame.com, after success:

    B9A00B7A-0E67-4C8B-BF49-0452175CA176.jpeg


    ##### 3, create a test page WXML, use the web-view control, and set the SRC address to the domain name configured above:

    <web-view src="https://passport.newgame.com"></web-view>Copy the code

    This automatically fills the page and overwrites other components. So no additional code is required

    ##### four, accomplished

    WechatIMG167.jpeg

##### FAQ:

WechatIMG168.jpeg


##### Note: web-view as a new control, how to use JSSDK in the web page, etc. Welcome to study together to discuss, feel useful please click a like