- 微信开放平台和公众号是一个主体 还用关联主体吗?
开放平台: [图片] 公众号: [图片]
2020-12-16 - 网页跳转移动应用 为什么 wx-open-launch-app:false 不识别?
demo连接:https://www.taohuitech.com/share/html/open_app.html 公众号设置: [图片] 网页跳转移动应用关联设置: [图片] config代码: [图片] [图片] <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <script type="text/javascript" src="../script/jquery-1.11.3.min.js"></script> </head> <body> <wx-open-launch-app id="launch-btn" appid="wx6e050cdcb554f633" extinfo="your-extinfo" > <template> <style>.btn { padding: 12px }</style> <button class="btn">App内查看</button> </template> </wx-open-launch-app> <script> $.getScript("//res2.wx.qq.com/open/js/jweixin-1.2.0.js", function callback() { var url = location.href.split('#')[0]; $.ajax({ type: "post", url: "/jssdk", dataType: 'json', data: { url: url }, success: function (res) { var data =res; wx.config({ debug: false, appId: data.appId, timestamp: data.timestamp, nonceStr: data.nonceStr, signature: data.signature, jsApiList: [ 'onMenuShareTimeline', 'onMenuShareAppMessage' ], openTagList: ['wx-open-launch-app'] }) wx.ready(function () { console.log('ready') wx.checkJsApi({ jsApiList: ['wx-open-launch-app'], // 需要检测的JS接口列表,所有JS接口列表见附录2, success: function (res) { // console.log('可用') }, fail: (err) => { // console.log(err, '不可用') } }) }) wx.error(function (res) { // alert(res) }) }, error: function (xhr, ajaxOptions, thrownError) { // alert("Http status: " + xhr.status + " " + xhr.statusText + "\najaxOptions: " + ajaxOptions + "\nthrownError:" + thrownError + "\n" + xhr.responseText); } }) }) </script> <script> var btn = document.getElementById('launch-btn'); btn.addEventListener('launch', function (e) { console.log('success'); }); btn.addEventListener('error', function (e) { console.log('fail', e.detail); }); </script> </body> </html> 问题截图: [图片] [图片] 安卓版本: [图片] 微信版本: [图片]
2020-12-16