2. HTML部分(username:小程序原生id,path:小程序页面地址) 赞 踩 1. 页面引入js 2. HTML、Vue部分(username:小程序原生id,path:小程序页面地址) 3. 注入微信配置 Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。
HTML、Vue——微信H5跳转小程序_html 打开微信小程序
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<wx-open-launch-weapp id="launch-btn" username="*****" path="******">
//H5
<script type="text/wxtag-template">
<style></style>
<button>立即使用小程序</button>
</script>
//或Vue
<template>
<div style="">立即进入</div>
</template>
</wx-open-launch-weapp>
wx.config({
debug: false,
appId: appId,
timestamp: timestamp,
nonceStr: nonceStr,
signature: signature,
jsApiList: ["onMenuShareTimeline", "onMenuShareAppMessage", "onMenuShareQQ", "onMenuShareQZone"],
openTagList: ['wx-open-launch-weapp']
});
wx.ready(function(){});
wx.error(function(res){});