H5跳转小程序的坑
---Start
1、如果是点击图片跳转
如果 这个wx-open-launch-weapp 标签里面是图片的话,不能使用 img,要使用微信小程序的标签image
- 安卓都可以,ios不行
2、如果按着官方文档跳转
< wx-open-launch-weapp
id="launch-btn"
appid="wx12345678"
path="pages/home/index?user=123&action=abc"
>
<script type="text/wxtag-template">
<style>.btn { padding: 12px }</style>
<button class="btn">打开小程序</button>
</script>
</wx-open-launch-weapp>
!!! 我的项目里面这样是不行的,需要改成下面的方法,因为 script、style 会报错
修改为
<wx-open-launch-weapp
style="width: 100%; height: 100%; display: block"
id="launch-btn"
username="wx_12345"
path="pages/index/index"
>
<div v-is="'script'" type="text/wxtag-template">
<div v-is="'style'">.btn { padding: 12px }</div>
<button class="btn">打开小程序</button>
</div>
</wx-open-launch-weapp>
---End
如果是在轮播图上面的话,当前轮播图滑不动,这个还未找到解决办法,emmm,调试也贼麻烦