<wx-open-launch-weapp id="launch-btn"
appid="wxf643b9a074d3b35b"
path="pages/home/home?env-version=trial">
<script type="text/wxtag-template">
<style>.btn { padding: 12px }</style>
<button class="btn">打开小程序</button>
</script>
</wx-open-launch-weapp>
<script>
var btn = document.getElementById('launch-btn');
btn.addEventListener('launch', function (e) {
console.log('success');
});
btn.addEventListener('error', function (e) {
console.log('fail', e.detail);
});
</script>

试下:https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_Open_Tag.html#21
<wx-open-launch-weapp id="launch-btn" appid="wxf643b9a074d3b35b" path="pages/home/home" env-version="trial"> <script type="text/wxtag-template"> <style>.btn { padding: 12px }</style> <button class="btn">打开小程序</button> </script> </wx-open-launch-weapp>