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="width: 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'],
好了應該可以打開了