javascript H5跳转小程序的方法
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
引用的要1.6最新的哦 才支持 这个非常重要!!!
<wx-open-launch-weapp id="launch-btn" username="gh_970553ce1b55" path="pages/p1/p1"> <template> <button style=" 200px; height: 45px; text-align: center; font-size: 17px; display: block; margin: 0 auto; padding: 8px 24px; border: none; border-radius: 4px; background-color: #07c160; color:#fff;">打开小程序</button> </template> </wx-open-launch-weapp>
openTagList: ['wx-open-launch-weapp'],
好了应该可以打开了