Recently, the product needs to design the product according to the jump specification between small program and H5, so I sorted out the jump mode between small program and H5 according to the latest wechat development document and shared it with everyone

Today is 2021/03/10, which may be less than half a year. As the rules of Tencent are adjusted, these contents may expire, please pay more attention to them.

Small program jump H5

Currently, it is not possible to load H5 directly by opening the browser through the applet. The H5 page can only be loaded through the Web-view component.

Conditions of use
  1. Personal applets do not support the use of Web-view, need enterprise applets
  2. Can directly open the associated public number of the article, other web pages need to log in the small program background to configure the business domain name
  3. The article domain name of the public number is like this: mp.weixin.qq.com/…
  4. Configure business domain: adm. Webportal. Top/sys/view. Js…

H5 jump small procedures – wechat browser

Open tabs with wechat. (Development needs to apply for open label permissions using JSSDK)

Conditions of use
  1. It can only be used in wechat browser (oN wechat PC, the management demo directly reported an error, which needs further verification)
  2. The H5 page domain name must be under the “JS interface Security domain name” of the authenticated service number or public number (or throw the H5 page into the small program cloud development – static website (without authentication).
  3. Can jump to any legal compliance of the small program

Demo demo:postpay-2g5hm2oxbbb721a4-1258211818.tcloudbaseapp.com/jump-mp.htm…

H5 jump small program – wechat browser or SMS application

Use the URL Scheme of the applet. The URL Scheme can be configured through the small program management background, or it can also be generated through the wechat API.

Conditions of use
  1. It can only jump in system applications such as wechat browser or SMS, and also in some apps (such as enterprise wechat, QQ, etc.).
  2. IOS: browser or system application can directly evoke wechat to open the small program through URL Scheme
  3. Android terminal: for non-browser applications, it is not possible to directly arouse wechat to open the small program. Generally, it is necessary to add an H5 page for transfer (simply put: Application → browser to open our H5 → Arouse wechat to open the small program).
  4. Scheme limit:
  • Daily maximum of 500,000 (permanent scheme + short-term scheme);
  • For schemes that are more than 31 days old or permanently valid, the total limit for a single small program is 100,000;
  • There is no upper limit for short-term schemes that are valid for less than 31 days.

Demo demo:postpay-2g5hm2oxbbb721a4-1258211818.tcloudbaseapp.com/jump-mp.htm…

Applet jump applet

Which is to open up another little program.

Conditions of use
  1. Requires the user to click on the page, that is, cannot automatically jump

  2. The system adds a prompt for jumping, and the user can jump only after confirmation

  3. Can jump to any legal compliance of the small program

added

Authentication free – Cloud development static site

When opening the small program H5 in wechat browser, you need to use JSSDK to apply for the permission to open the label before jumping. Because you want to use JSSDK, so it requires the domain name H5, must be configured in the JS secure domain name of a public number. However, if the current H5 page is deployed in applets – cloud development – static site, you can skip the JS secure domain name restriction.

Public account H5 page jump APP

Open tabs with wechat

Conditions of use
  1. The target mobile application must be approved under the wechat open platform account

  2. The domain name of the H5 page is under the JS secure domain name (JSSDK is required)

Refer to the link

  • Small program loading H5:developers.weixin.qq.com/miniprogram…

  • Open label instructions document: developers.weixin.qq.com/doc/offiacc…

  • URL Scheme:developers.weixin.qq.com/miniprogram…

  • Static site H5 jump small program: developers.weixin.qq.com/miniprogram…

  • The small program to open the small program: developers.weixin.qq.com/miniprogram…

  • The public, H5 open APP:developers.weixin.qq.com/doc/oplatfo…