html 代码:<wx-open-launch-weapp
id="launch-btn"
username="gh_3836abb2ce72"
path="pages/search/main"
style="display: block;float: left;width: 100%;height: 40px;"
>
<template>
<style>.btn { padding: 12px }</style>
<button class="btn">打开小程序</button>
</template>
</wx-open-launch-weapp>
js 代码 :wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印
appId: data.appId, // 必填,公众号的唯一标识
timestamp: data.timestamp, // 必填,生成签名的时间戳
nonceStr: data.nonceStr, // 必填,生成签名的随机串
signature: data.signature, // 必填,签名
jsApiList: [
'onMenuShareTimeline',
'onMenuShareQQ',
'previewImage',
'uploadImage',
"updateAppMessageShareData",
"updateTimelineShareData",
'chooseImage',
],
openTagList: ['wx-open-launch-weapp'] // 可选,需要使用的开放标签列表,例如['wx-open-launch-app']
});
}
});
wx.ready(function(res) {
alert('ready')
});
wx.error(function (res) {
alert(JSON.stringify(res),"1")
alert(JSON.parse(res),"2")
// config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名
});
你好,IOS任何机型必现问题吗?麻烦提供下复现的链接,并详细描述下复现的流程。