[图片][图片] 请求有加openTagList,但是没有返回,点击无反应。另一个项目同样的代码,有返回,也可以点击。请问这是什么原因???
<wx-open-launch-weapp>点击无反应?微信公众号的测试号内的网页进行调用小程序,点击什么反应都没有。公众号关联了小程序,js安全域名也配置了,小程序没有正式发布,wx.config是正常,不知道怎么回事 代码片段 <wx-open-launch-weapp id="launch-btn" @launch="handleLaunchFn" @error="handleErrorFn" username="gh_xxxxxxx" path="/pages/xxx/index.html"> <template> <button>打开小程序</button> </template> </wx-open-launch-weapp> handleLaunchFn (e) { alert(e) }, handleErrorFn(e){ alert('fail', e.detail); }, initWx () { wxConfig({url: location.href.split('#')[0]}).success(data => { wx.config({ debug: false, appId: data.appId, timestamp: data.timestamp, nonceStr: data.nonceStr, signature: data.signature, jsApiList: [ 'checkJsApi', 'onMenuShareAppMessage', 'onMenuShareQQ' ], openTagList: ['wx-open-launch-weapp'] }); wx.ready(() => { let btn = document.getElementById('launch-btn'); btn.addEventListener('launch', function (e) { }); btn.addEventListener('error', function (e) { console.log('fail', e.detail); }); }); wx.error(function (res) { console.log(res) }); }); }
2021-01-22