debug:ok The safe domain name has also been added. The official account is also a service account. I am so confused. The most important thing is that the WeChat developer tool is passed and displayed correctly.
<script src='http://res.wx.qq.com/open/js/jweixin-1.0.0.js'></script>
<script>
$.getJSON('获取data接口', function(data) {
data.jsApiList = ['onMenuShareTimeline','onMenuShareAppMessage'];
wx.config(data);
wx.ready(function () {
wx.showOptionMenu();
wx.onMenuShareTimeline({
title: '分享标题', // 分享标题
link: '分享链接', // 分享链接
imgUrl: '分享图标', // 分享图标
success: function (res) {
alert(JSON.stringify(res));
},
cancel:function (res) {
alert(JSON.stringify(res));
},
fail: function (res) {
alert(JSON.stringify(res));
}
});
wx.onMenuShareAppMessage({
title: '分享标题', // 分享标题
desc: '分享描述', // 分享描述
link: '分享链接', // 分享链接
imgUrl: '分享图标', // 分享图标
success: function (res) {
alert(JSON.stringify(res));
},
cancel: function (res) {
alert(JSON.stringify(res));
},
fail: function (res) {
alert(JSON.stringify(res));
}
});
});
});
</script>
link
Is it the same domain name as the safe domain name?What is the result of success, cancel, fail callback execution on the mobile phone?
I have answered similar questions to yours before
/q/10...
Simply wonderful. . . . = =
https://mp.weixin.qq.com/wiki...
https://mp.weixin.qq.com/wiki...
https://mp.weixin.qq.com/wiki