Web-View
When the mini program developer uses the web-view component, if he wants to call the API capabilities of the mini program in the H5 page, he needs to implement it through JSSDK.
JSSDK is a toolkit for web developers. By using JSSDK, web developers can use some native capabilities (such as camera, album, audio, location, etc.) in the corresponding H5 page to provide users with a better web experience.
Since JSSDK is based on the mini program web-view component container implementation, it can only be used to open links in the mini program. For the domain name management of the web page, please refer to the platform management or the mini program development management domain name whitelist configuration.
How to use
Please load the corresponding JSSDK in the web page, refer to the following code:
<script src="path/to/jssdk.js"></script>
<script>
// go to pay Page from click in H5 Page
document.getElementById("payBtn").click = funciton(e){
wx.miniProgram.navigateTo({ url : "/pages/pay/pay"});
}
</script>