我們項(xiàng)目中需要往小程序端引流榨婆,所以加了這個(gè)功能窿锉,七月份的時(shí)候聽說(shuō)微信出了一個(gè)開放標(biāo)簽,可以實(shí)現(xiàn)微信內(nèi)h5往小程序的跳轉(zhuǎn)轧简,當(dāng)時(shí)忙就一直沒(méi)做驰坊,現(xiàn)在終于下手了
首先一定要認(rèn)認(rèn)真真閱讀官方文檔
https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_Open_Tag.html
我就是沒(méi)有仔細(xì)讀,然后jssdk引入版本不對(duì)哮独,卡了兩天
image.png
image.png
代碼如下
<wx-open-launch-weapp id="launch-wxapp" :username="小程序原始id"
path="跳轉(zhuǎn)到小程序的頁(yè)面后面可拼參數(shù)">
<script type="text/wxtag-template">
<style>
.btn-open-weapp {
background: #fdc010;
border: 0;
color: #ffffff;
border-radius: 50px;
text-align: center;
height: 35px;
line-height: 35px;
outline:none;
padding: 0px 40px;
font-size: 14px;
}
</style>
<button class="btn-open-weapp">立即前往小程序 </button >
</script>
</wx-open-launch-weapp>