wx.config({ debug: false, appId: response.appId, timestamp: response.timestamp, nonceStr: response.nonceStr, signature: response.signature, jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo' ] }); wx.ready(function () { wx.onMenuShareTimeline({ title: $('title').text(), link: window.location.href, imgUrl: $("#text_content img").length > 0 ? $("#text_content img") .attr("src") : "https://moban.dayoo.com/public/c/2016/static/images/share-icon2.jpg" }); wx.onMenuShareAppMessage({ title: $('title').text(), desc: $("[name=description]").attr("content"), link: window.location.href, imgUrl: $("#text_content img").length > 0 ? $("#text_content img") .attr("src") : "https://moban.dayoo.com/public/c/2016/static/images/share-icon2.jpg", type: '', dataUrl: '' }); wx.onMenuShareQQ({ title: $('title').text(), desc: $("[name=description]").attr("content"), link: window.location.href, imgUrl: $("#text_content img").length > 0 ? $("#text_content img") .attr("src") : "https://moban.dayoo.com/public/c/2016/static/images/share-icon2.jpg" }); wx.onMenuShareWeibo({ title: $('title').text(), desc: $("[name=description]").attr("content"), link: window.location.href, imgUrl: $("#text_content img").length > 0 ? $("#text_content img") .attr("src") : "https://moban.dayoo.com/public/c/2016/static/images/share-icon2.jpg" }); }); } } }); var t = "https://moban.dayoo.com/public/c/2016/static/images/share-icon2.jpg"; $("body").prepend('
');