When mini-program developers use the web-view component and want to call mini program API capabilities within an H5 page, they need to implement this using JSSDK. JSSDK is a toolkit for web developers. By using the JSSDK, web developers can use some of the native capabilities (e.g. camera, album, audio, location, etc.) within the corresponding H5 page to provide users with a better web experience.
Since JSSDK is implemented based on the mini program's web-view component container, it can only be used when the link is opened within a mini-program. For domain management of the webpage, please refer to Platform management or Mini program management - Development management. 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>
Online address
Was this page helpful?