Version for
Wechat version requirements: 7.0.12 or later.
The system version must be iOS 10.3 or later, and Android 5.0 or later.
The SDK version must be 1.6.0 or later
Open wechat mini program open TAB
wx-open-launch-weapp
Open the object
The web page bound to the “JS interface security domain name” by the authenticated service number can use this label to jump to any legal and compliant small program.
Certified non-personal subject small program, the use of small program cloud development of static web hosting binding domain name under the web page, can use this label to jump to any legal compliance small program.
Directions for use
All open tags can be used directly in a page just like normal HTML tags, requiring no additional processing.
If the tag used allows slots to be provided, care needs to be taken to define the style of the template in the slot, since the style of the template in the slot is isolated from the page. Slot templates and styles need to be wrapped. In addition, you need to specify the name of a named slot through the slot attribute. The default slot in the following label slot is the default slot, and the slot name is not required.
For tag events, details can be obtained from event.detail. Unless otherwise specified, the returned values in the label event description below refer to the contents of event.detail.
Error message
If the following page is displayed, it indicates that the service number or small program bound to the page is not authorized. Check whether the preceding conditions for opening objects are met.
Related Parameters
attribute
The name of the | mandatory | note |
---|---|---|
username | is | The original ID of the applet you want to jump to, that is, the corresponding id starting with GH_ |
path | no | Page path and parameters in the applet to jump to |
slot
The name of the | mandatory | note |
---|---|---|
default | is | Jump button templates and styles |
<wx-open-launch-weapp id="launch-btn" username="gh_ce3adf9da091" path="pages/index/index"></wx-open-launch-weapp>
Copy the code
If used in Vue programs, the TAGS wX-open-launch-pervasive are not recognized by Vue
Vue must be made to ignore custom elements outside of Vue (e.g., using the Web Components APIs). Otherwise, it will assume that you forgot to register the global component or misspelled the component name, and will throw a warning about the Unknown Custom Element. Add the following code configuration to main.js (ignore this tag)
Vue. Config. IgnoredElements = [‘ wx – open – launch – weapp ‘]
Complete code Demo can follow the wechat public number
H5 jump small program -jq] get Jquery version demo
Reply [H5 jump applet -vue] to get vUE version demo
Give it a thumbs up if you find it helpful. Thank you
Follow me and share technical dry goods from time to time