wx-open-launch-weapp在安卓下可以正常显示正常跳转到小程序,在IOS下却不显示?
<html> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script src="https://www.XXXXX.cn/app/site/statics/js_mini/moo_min.js"></script> <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js" type="text/javascript"></script> <script> var theRequest = new Object(); theRequest['type']='ajax'; // 请求签名等数据 new Request({ method: 'post', url: "https://www.XXXXX.cn/product-weixinInfo.html", data:theRequest, async: false, evalScripts: true, onSuccess: function (res) { console.log('weixinInfo_res',res); res=JSON.decode(res); // 通过config接口注入权限验证配置并申请所需开放标 wx.config({ debug: true, // 是否开启调试模式 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印 appId:res.appId,// 必填,公众号的唯一标识 timestamp:res.timestamp,// 必填,生成签名的时间戳 nonceStr: res.nonceStr, signature:res.signature,// 必填,签名 jsApiList: [ // "onMenuShareTimeline", // "onMenuShareAppMessage", //"onMenuShareQQ", //"onMenuShareWeibo", //"onMenuShareQZone", "openLocation", "chooseWXPay", "chooseImage", "previewImage", ],// 必填,需要使用的JS接口列表 openTagList:[ 'wx-open-launch-weapp', //跳转小程序 //'wx-open-launch-app' //跳转app ]// 可选,需要使用的开放标签列表,例如['wx-open-launch-app'] }); wx.error(function (e) { console.log('用户拒绝跳转或跳转异常', e.detail) // alert(JSON.stringify(e)); // config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名 }); wx.ready(function(){ console.log('config成功') }) }, onFailure: function () { }, onComplete:function(res){ } }).send(); </script> <wx-open-launch-weapp style="height:43px;width: 330px;" appid="wxXXXXXXX6397" id="pdp-launch-btn" username="gh_XXXXXX" path="/pages/index/index" > <template> <button class="btn">前往小程序商城购买123</button> </template> </wx-open-launch-weapp> </html> <script> var btn = document.getElementById('pdp-launch-btn'); console.log('pdp-launch-btn002',btn); btn.addEventListener('ready', function (e) { alert('ready'); }); btn.addEventListener('launch', function (e) { alert('success'); }); btn.addEventListener('error', function (e) { alert('fail'); console.log('fail',e.detail); }); </script> 安卓下显示: [图片] IOS下显示: [图片]