var weixinapi="http://res.wx.qq.com/open/js/jweixin-1.2.0.js";loadAsyncScript(weixinapi,function(){var c=window.location.href;var b=$("#sharedata_des").html();var a=$("#sharedata_pic").html();initweixindata(c,b,a)});function initweixindata(c,b,a){var d=webd+"api/getweixininfo";$.ajax({type:"POST",url:d,dataType:"json",data:{url:""+c+""},success:function(f){if(f==null){return false}wx.config({debug:false,appId:f.AppId,timestamp:f.Timestamp,nonceStr:f.NonceStr,signature:f.Signature,jsApiList:["checkJsApi","onMenuShareTimeline","onMenuShareAppMessage","onMenuShareQQ","onMenuShareQZone","onMenuShareWeibo"]});var e;wx.ready(function(){wx.checkJsApi({jsApiList:["getNetworkType","onMenuShareTimeline","onMenuShareAppMessage","onMenuShareQQ","onMenuShareQZone","onMenuShareWeibo"],success:function(g){},fail:function(g){}});e={desc:b,link:c,imgUrl:a,trigger:function(g){},success:function(g){},cancel:function(g){},fail:function(g){}};wx.onMenuShareAppMessage(e);wx.onMenuShareTimeline(e);wx.onMenuShareQQ(e);wx.onMenuShareWeibo(e);wx.onMenuShareQZone(e)});wx.error(function(g){})},error:function(f){console.log(f)}})};