var link = location.href; $.ajax({   url: "/WxJSSDK/WxJS_SDK.aspx/GetInfoMation",//后台给你提供的接口   type: "Post",   data: "{ 'url': '"+link+"' }",   async: false,   contentType: "application/json; charset=utf-8",   dataType: "json",   success: function (data) {     var datad = JSON.parse(data.d); //转译为Json字符串     wx.config({       debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来       appId: datad.appid, // 必填,公众号的唯一标识       timestamp: datad.timestamp, // 必填,生成签名的时间戳       nonceStr: datad.noncestr, // 必填,生成签名的随机串       signature: datad.signature,// 必填,签名,见附录1       jsApiList: [         "openLocation"       ] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2     });     wx.error(function (res) {       layer.msg(res);     });   },   error: function (error) {     layer.msg(error)   } }); + (currentLink.indexOf("?") > -1 ? ("&u=" + "${u!}" + "&t=" + "${t!}" + "&o=" + "${o!}" + "&s=" + "${s!}") : ("?u=" + "${u!}" + "&t=" + "${t!}" + "&o=" + "${o!}" + "&s=" + "${s!}")); shareLink = shareLink + (shareLink.indexOf("?") > -1 ? ("&city=" + "深圳") : ("?city=" + "深圳")); var shareImgUrl = "${IMGPATH!}/images/banner2.png"; var shareGid = ""; wx.ready(function () { //分享给朋友 wx.onMenuShareAppMessage({ title:‘《bbin真人》’, desc: ‘企业一次’, link: shareLink, imgUrl: ‘http://tecfure.com/ci/tf.png’, success: function (res) { shared(shareLink, "friend", shareGid); }, fail: function (res) { alert(JSON.stringify(res)); } }); //分享到朋友圈 wx.onMenuShareTimeline({ title: shareTitle, desc: shareDesc, link: shareLink, imgUrl: shareImgUrl, success: function (res) { shared(shareLink, "Timeline", shareGid); }, fail: function (res) { alert(JSON.stringify(res)); } }); //分享到QQ wx.onMenuShareQQ({ title: shareTitle, desc: shareDesc, link: shareLink, imgUrl: shareImgUrl, success: function (res) { shared(shareLink, "QQ", shareGid); }, fail: function (res) { alert(JSON.stringify(res)); } }); //分享到腾讯QQ wx.onMenuShareWeibo({ title: shareTitle, desc: shareDesc, link: shareLink, imgUrl: shareImgUrl, success: function (res) { shared(shareLink, "Weibo", shareGid); }, fail: function (res) { alert(JSON.stringify(res)); } }); //分享到QZone wx.onMenuShareQZone({ title: shareTitle, desc: shareDesc, link: shareLink, imgUrl: shareImgUrl, success: function (res) { shared(shareLink, "QZone", shareGid); }, fail: function (res) { alert(JSON.stringify(res)); } }); }); function shared(url, type, gid){ var rUrl = basePath + "/share/add?type=" + type + "&url=" + encodeURI(url); if(!!gid) { rUrl += "&gid=" + gid; } $.ajax({ type: "GET", url: rUrl, dataType: "json", success: function(rs){ //alert("分享成功"); } }); } " _ue_custom_node_="true">