请问解决了吗
web-view组件内嵌网页,updateAppMessageShareData无法执行?[图片] 如图,在web-view搭载的网页中,使用公众号的appid,调用wx.updateAppMessageShareData无法执行? 但是在其他地方调用扫码却是可以的?是小程序内置浏览器的问题吗? let res = await this.$axios.post(this.$api.getJsSdkSign, { url: window.systemVersion.BASEURL_CLOUD + "/assembly/" // location.href.split("#")[0] }); wx.config({ debug: true, appId: "", // 此处省略appid............ timestamp: res.timestamp, nonceStr: res.nonceStr, signature: res.signature, jsApiList: ["checkJsApi", "scanQRCode", "updateAppMessageShareData"] }); wx.ready(function() { wx.checkJsApi({ jsApiList: ["updateAppMessageShareData"], success: function(res) { console.log(res); } }); wx.updateAppMessageShareData({ title: "添加员工", desc: "30分钟有效", link: `https://${window.systemVersion.host}/assembly/#/index/staffManage/addStaff`, imgUrl: "../../../assets/mini/mini-introduction-bg.png", success: function() { // 设置成功 } }); });
2021-06-26