/public/client/html5/1.3.5/images/shareicon.png',//分享图标type:'',//分享类型,music、video或link,不填默认为linkdataurl:'',//如果type是music或video,则要提供数据链接,默认为空success:function{//用户确认分享后执行的回调函数$.ajax({url:"/choujiangajax/getfenxiang.do",type:"post",data:'',success:function(json){if(json.url){hg_gotourl(json.url);}else{window.location.reload;}}})},cancel:function{//用户取消分享后执行的回调函数console.log('cancel');}};wx.onmenushareappmessage(sharedata);wx.onmenushareappmessage(sharedata);wx.onmenushareqq(sharedata);wx.onmenushareweibo(sharedata);wx.onmenushareqzone(sharedata);//分享到朋友圈时只有标题,所这里拼接一下varcopy_sharedate={};$.extend(copy_sharedate,sharedata);copy_sharedate.title=copy_sharedate.title+""+copy_sharedate.desc;wx.onmenusharetimeline(copy_sharedate);});wx.error(function(res){//hg_toast(res.errmsg);//打印错误消息。及把debug:false,设置为debug:ture就可以直接在网页上看到弹出的错误提示});}}});}}<!--微信jssdk-->