1$(function(){ 2 3 var url =window.location.href.split('#')[0];//ç¨æ·è¦å享çç½å 4 var title = $(document).attr("title");//åäº«çæ é¢ 5 var shareUrl = $("meta[name=image]").prop('content') 6 var img = shareUrl.indexOf('http') === -1 ? location.origin + shareUrl: shareUrl;//å享çå¾ç 7 var desc = $("meta[name=description]").prop("content");//å享çæè¿°ä¿¡æ¯ 8 9 var ua = navigator.userAgent.toLowerCase();//è·å夿ç¨ç对象s 10 if (ua.match(/MicroMessenger/i) == "micromessenger") { 11 //微信å享 12 $.ajax({ 13 url:"https://www.jimei.cn/front/wx/share?url="+url, 14 type: "get", 15 dateType: "json", 16 success:function(res){ 17 wx.config({ 18 debug: false, 19 appId: res.data.appId, 20 timestamp: res.data.timestamp, 21 nonceStr: res.data.nonceStr, 22 signature: res.data.signature, 23 jsApiList: [ 24 'checkJsApi', 25 'onMenuShareTimeline', 26 'onMenuShareAppMessage', 27 'onMenuShareQQ', 28 'onMenuShareWeibo', 29 'onMenuShareQZone' 30 ] 31 }); 32 }, 33 error:function () { 34 } 35 }); 36 37 var shareConfig={ 38 title: title, // å享æ é¢ 39 desc: desc, // å享æè¿° 40 link: url, // åäº«é¾æ¥ 41 imgUrl: img, // åäº«å¾æ 42 success: function () { 43 }, 44 cancel: function () { 45 // ç¨æ·åæ¶åäº«åæ§è¡çåè°å½æ° 46 } 47 }; 48 49 wx.ready(function(){ 50 //微信æåå 51 wx.onMenuShareTimeline(shareConfig); 52 //åéç»å¾®ä¿¡å¥½å 53 wx.onMenuShareAppMessage(shareConfig); 54 //è ¾è®¯å¾®å 55 wx.onMenuShareWeibo(shareConfig); 56 //QQç©ºé´ 57 wx.onMenuShareQZone(shareConfig); 58 }); 59 } 60}); 61 62 63 64
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.