The official API
1. How to open small programs or app in wechat browser
Wechat documents, found wechat secretly updated this interface, can let the wechat browser under the H5 jump into the small program.
- Ps: using JS – SDK interface, you need to use to JS – SDK – 1.6.0 version has support, res.wx.qq.com/open/js/jwe…
Wx. config({debug: true, // Enable the debug mode, the return value of all API calls will be displayed in the client alert, if you want to view the passed parameter, you can open it in the PC, the parameter information will be printed in the log, only in the PC will print the appId: Timestamp:,// Required, generated signature nonceStr: ",// Required, generated signature random string jsApiList: ",// Required, generated signature jsApiList: [], // Mandatory. OpenTagList: [] // Optional, list of open tags that need to be used, such as [' wX-open-launch-app, wX-open-launch-p ']});Copy the code
Among them
OpenTagList: ['wx-open-launch-app'] // Optional, list of open labels to use, e.g. ['wx-open-launch-app']Copy the code
- See the official documentation developers.weixin.qq.com/doc/offiacc…
2, how to open small programs in non-wechat
Through the server interface or in the applets management background “tools” – “Generate URL Scheme” entry can be obtained to open any page of the applets URL Scheme. It is suitable for opening small programs from SMS, email, and external wechat web pages. The value of the scenario for opening applets through URL Scheme is 1065. The generated URL Scheme looks like this:
- See official documentation
Developers.weixin.qq.com/miniprogram…
Other methods
- 1. Inside wechat H5, put a small program code picture, and then prompt the user to long press the small program code picture to experience the small program
- 2. Wechat H5 provides a link to jump to the official number MP article, which is the internal article of the official number. At this time, because the official number can wake up the small program in four ways: text, picture, small program card and small program code in the screenshot below.