- updateAppMessageShareData没有执行回调方法?
经测试,微信SDK新提供的分享方法updateAppMessageShareData和updateTimelineShareData中,success回调不会在分享成功后执行,而是在进入页面时就执行了,跟SDK版本无关,我使用1.6.0版本,采用即将废弃的老版分享可以正常回调。
2020-11-16 - 里面的button按钮的结束标签竟然没有闭合
https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_Open_Tag.html <button class="btn">App内查看<button> 应为</button> <button class="btn">App内查看</button>
2020-06-03 - wx-open-launch-app 开放标签自带一个内容空白的按钮,这个怎么可以设置相关样式?
代码:<script> //当前页URL var pageurl = encodeURIComponent(location.href.split('#')[0]); $.ajax({ url: "/jssdk/index?url=" + pageurl, dataType: "json", success: function(data) { wx.config({ debug: true, appId: data.appId, timestamp: data.timestamp, nonceStr: data.nonceStr, signature: data.signature, jsApiList: ['checkJsApi', 'onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'previewImage', 'chooseImage', 'uploadImage', 'downloadImage', 'hideOptionMenu', 'hideMenuItems', 'hideAllNonBaseMenuItem' ], openTagList: ['wx-open-launch-app'] }); } }); </script> </head> <body> <wx-open-launch-app id="launch-btn" appid="wx740ad8508cb83826" extinfo="http://mdev.hzpgc.com/brand/detail/257" > <template> <style>.btn { padding: 12px }</style> <button class="btn">App内查看<button> </template> </wx-open-launch-app> <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); alert(e.detail.errMsg); }); </script> </body> </html> [图片]
2020-06-02