jQuery(".txtScroll-top").slide({ mainCell: ".bd ul", autoPage: true, effect: "top", autoPlay: true, vis: 7 }); jQuery(".picScroll-left").slide({ titCell: ".hd ul", mainCell: ".bd ul", autoPage: true, effect: "left", autoPlay: true, vis: 4, trigger: "click" }); function click_wechat() { const input = document.createElement('input'); input.setAttribute('readonly', 'readonly'); input.setAttribute('value', window.location.href); document.body.appendChild(input); input.setSelectionRange(0, 9999); if (document.execCommand('copy')) { document.execCommand('copy'); alert('复制成功,可转发链接'); } document.body.removeChild(input); } function Share(pType) { var pTitle = ""; //待分享的标题 var pImage = ""; //待分享的图片 var pContent = ""; //待分享的内容 var pUrl = window.location.href; //当前的url地址 var pObj = jQuery("div[class='yogo_hc']").find("h4"); if (pObj.length) { pTitle = pObj.text(); } var pObj = jQuery("div[class='yogo_hcs']").find("em"); if (pObj.length) { pContent = pObj.text(); } var pObj = jQuery("div[class='con_cons']").find("img"); if (pObj.length) { pImage = jQuery("div[class='con_cons']").find("img", 0).attr("src"); } shareys(pType, pUrl, pTitle, "", pContent); } function shareys(type, url, title, img, content) { switch (type) { case "sina": url = "http://service.weibo.com/share/share.php?title=" + encodeURIComponent(content + '「' + title + '」' + ' 点这里' + url) + '&pic=' + img; window.open(url); break; case "tqq": url = "https://connect.qq.com/widget/shareqq/iframe_index.html?url=" + encodeURIComponent(url) + '&title=' + encodeURIComponent(title) + '&pic=' + img; window.open(url); break; case "qzone": url = 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=' + encodeURIComponent(url) + '&title=' + encodeURIComponent(title) + '&site=&pics=' + encodeURIComponent(img) + '&desc=' + encodeURIComponent(content) + '&summary=' + encodeURIComponent(content); window.open(url); break; case "ren": url = 'http://widget.renren.com/dialog/share?resourceUrl=' + encodeURIComponent(url) + '&srcUrl=' + img + '&title=' + encodeURIComponent(title); +'&description=' + content; window.open(url); break; default: break; } } function prase(id){ if($("#prase_num").val()==1){ return false; } $.ajax({ url: "/Article/ajax_prase.html", data: {id:id}, type: 'post', cache: false, dataType: 'json', success: function (data) { if(data.code=200){ $("#prase_num").val('1'); $("#prase_number").html(data.num); }else{ } }, error: function () { //alert('网络错误,请联系管理员'); } }); }