var conf_data = { appId: 'wx55a40a8a729c6ed3', timestamp: 1730262037, nonceStr: 'zuiceshicom', signature: 'c1346f20786c95c202ab6990fe5f46d6b5885def' }; var shareData = { trigger: function(res) { wx.onMenuShareAppMessage(shareData); wx.onMenuShareTimeline(shareData); wx.onMenuShareQQ(shareData); } }; wx.config({ debug: false, appId: conf_data.appId, timestamp: conf_data.timestamp, nonceStr: conf_data.nonceStr, signature: conf_data.signature, jsApiList: ['checkJsApi', 'onMenuShareAppMessage', 'onMenuShareTimeline', 'onMenuShareQQ', 'closeWindow'] }); wx.ready(function() { wx.onMenuShareAppMessage(shareData); wx.onMenuShareTimeline(shareData); wx.onMenuShareQQ(shareData); }); wx.checkJsApi({ jsApiList: ['onMenuShareTimeline'], success: function(res) {} }); function shareCallBack() { var url = data_domain + "/d/share.aspx?id=" + subject_data.id + "&callback=?"; $.getJSON(url, function (result) { //if (confirm("获取更多好玩有趣的测试\n请关注【最测试】")) { // location.href = "http://www.zuiceshi.com/gz.html"; //} }); } shareData = { title: "💟" + subject_data.title, desc: subject_data.desc || "【最测试】全网最潮的趣味测试平台", link: subject_data.shareurl || "", imgUrl: subject_data.logo, trigger: shareData.trigger, success: function() { shareCallBack(); } }; wx.error(function (res) { //alert(res); });