"ab";var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { return typeof e } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e }; !function () { var e = function (e) { var o = {}; if (e.name.indexOf(" ") >= 0) return !1; if (!e.name) return !1; if (o.name = e.name, e.gaSupport ? o.gaSupport = e.gaSupport : o.gaSupport = !1, !e.customVarSlot && e.gaSupport) return !1; if (o.customVarSlot = e.customVarSlot, !e.variations) return !1; o.variations = e.variations, e.chooseVariationNumber ? o.chooseVariationNumber = e.chooseVariationNumber : o.chooseVariationNumber = Math.floor(Math.random() * t.keys(o.variations).length), o.newCookieSet = null; var n = "abjs_" + o.name, a = t.queryString(); if (o.cookieVariation = t.getCookie(n), o.queryVariation = a["abjs-setvar-" + o.name], t.isFunction(o.variations[o.queryVariation]) ? o.assignedVariation = o.queryVariation : o.assignedVariation = o.cookieVariation, "yes" === a["abjs-setcookie"] && (o.newCookieSet = !0), "" === o.assignedVariation || !t.isFunction(o.variations[o.assignedVariation])) { var i = o.chooseVariationNumber; o.assignedVariation = t.keys(o.variations)[i], o.newCookieSet = !0 } if (!0 === o.newCookieSet) { var r = e.cookiePath || window.location.pathname; t.setCookie(n, o.assignedVariation, 365, r, e.domain) } return o.execute = function () { t.contentLoaded(window, function () { o.variations[o.assignedVariation]() }) }, o.execute(), o.gaSupport && (window._gaq = window._gaq || [], window._gaq.push(["_setCustomVar", o.customVarSlot, "abjs_" + o.name, "abjs_" + o.assignedVariation, 1])), o }, t = {}; t.setCookie = function (e, t, o, n, a) { var i = new Date; i.setDate(i.getDate() + o), console.log(i.toUTCString()); var r = escape(t) + (null === o ? "" : "; expires=" + i.toUTCString()), s = e + "=" + r + "; path=" + n; a && (s += "; domain=" + a), document.cookie = s }, t.getCookie = function (e) { var t, o, n, a = document.cookie.split(";"); for (t = 0; t < a.length; t++)if (o = a[t].substr(0, a[t].indexOf("=")), n = a[t].substr(a[t].indexOf("=") + 1), (o = o.replace(/^\s+|\s+$/g, "")) == e) return unescape(n); return "" }, t.keys = function (e) { if (e !== Object(e)) throw new TypeError("ABTestUtils.keys called on non-object"); var t = [], o = null; for (o in e) Object.prototype.hasOwnProperty.call(e, o) && t.push(o); return t }, t.isFunction = function (e) { return !!(e && e.constructor && e.call && e.apply) }, t.contentLoaded = function (e, t) { var o = !1, n = !0, a = e.document, i = a.documentElement, r = a.addEventListener ? "addEventListener" : "attachEvent", s = a.addEventListener ? "removeEventListener" : "detachEvent", c = a.addEventListener ? "" : "on", u = function n(i) { "readystatechange" == i.type && "complete" != a.readyState || (("load" == i.type ? e : a)[s](c + i.type, n, !1), !o && (o = !0) && t.call(e, i.type || i)) }; if ("complete" == a.readyState) t.call(e, "lazy"); else { if (a.createEventObject && i.doScroll) { try { n = !e.frameElement } catch (e) { } n && function e() { try { i.doScroll("left") } catch (t) { return void setTimeout(e, 50) } u("poll") }() } a[r](c + "DOMContentLoaded", u, !1), a[r](c + "readystatechange", u, !1), e[r](c + "load", u, !1) } }, t.queryString = function () { for (var e = {}, t = window.location.search.substring(1).split("&"), o = 0; o < t.length; o++) { var n = t[o].split("="); e[unescape(n[0])] = unescape(n[1]) } return e }, "object" === ("undefined" == typeof exports ? "undefined" : _typeof(exports)) ? module.exports = { ABTest: e, ABTestUtils: t } : (window.ABTest = e, window.ABTestUtils = t) }();
"js.cookie";!function (e) { var n = !1; if ("function" == typeof define && define.amd && (define(e), n = !0), "object" == typeof exports && (module.exports = e(), n = !0), !n) { var o = window.Cookies, t = window.Cookies = e(); t.noConflict = function () { return window.Cookies = o, t } } }(function () { function e() { for (var e = 0, n = {}; e < arguments.length; e++) { var o = arguments[e]; for (var t in o) n[t] = o[t] } return n } function n(o) { function t(n, r, i) { var c; if ("undefined" != typeof document) { if (arguments.length > 1) { if ("number" == typeof (i = e({ path: "/" }, t.defaults, i)).expires) { var a = new Date; a.setMilliseconds(a.getMilliseconds() + 864e5 * i.expires), i.expires = a } i.expires = i.expires ? i.expires.toUTCString() : ""; try { c = JSON.stringify(r), /^[\{\[]/.test(c) && (r = c) } catch (e) { } r = o.write ? o.write(r, n) : encodeURIComponent(r + "").replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent), n = (n = (n = encodeURIComponent(n + "")).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)).replace(/[\(\)]/g, escape); var s = ""; for (var f in i) i[f] && (s += "; " + f, !0 !== i[f] && (s += "=" + i[f])); return document.cookie = n + "=" + r + s } n || (c = {}); for (var p = document.cookie ? document.cookie.split("; ") : [], d = /(%[0-9A-Z]{2})+/g, u = 0; u < p.length; u++) { var l = p[u].split("="), C = l.slice(1).join("="); this.json || '"' !== C.charAt(0) || (C = C.slice(1, -1)); try { var m = l[0].replace(d, decodeURIComponent); if (C = o.read ? o.read(C, m) : o(C, m) || C.replace(d, decodeURIComponent), this.json) try { C = JSON.parse(C) } catch (e) { } if (n === m) { c = C; break } n || (c[m] = C) } catch (e) { } } return c } } return t.set = t, t.get = function (e) { return t.call(t, e) }, t.getJSON = function () { return t.apply({ json: !0 }, [].slice.call(arguments)) }, t.defaults = {}, t.remove = function (n, o) { t(n, "", e(o, { expires: -1 })) }, t.withConverter = n, t } return n(function () { }) });
"layer.3.5.1";!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var t=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}(),i=e.LAYUI_GLOBAL||{};return i.layer_dir||t.substring(0,t.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c="creating",u=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function d(t){var n=100,a=document.getElementById(f);return++u>1e4/n?e.console&&console.error(l+".css: Invalid"):void(1989===parseInt(o.getStyle(a,"width"))?(t===c&&a.removeAttribute("lay-status"),a.getAttribute("lay-status")===c?setTimeout(d,n):i()):(a.setAttribute("lay-status",c),setTimeout(function(){d(c)},n)))}()}}},r={v:"3.5.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/css/layer/"+e.extend):o.link("css/layer/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/css/layer/":"css/layer/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:260},n))}},s=function(e){var t=this,a=function(){t.creat()};t.index=++r.index,t.config.maxWidth=i(n).width()-30,t.config=i.extend({},t.config,o.config,e),document.body?a():setTimeout(function(){a()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],l.SHADE="layui-layer-shade",l.MOVE="layui-layer-move",s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,minStack:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
'+(f?r.title[0]:r.title)+"
":"";return r.zIndex=s,t([r.shade?'
':"",''+(e&&2!=r.type?"":u)+'
'+(0==r.type&&r.icon!==-1?' ':"")+(1==r.type&&e?"":r.content||"")+'
'+function(){var e=c?' ':"";return r.closeBtn&&(e+=' '),e}()+" "+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t
'+r.btn[t]+"";return' '+e+"
"}():"")+(r.resize?' ':"")+" "],u,i('
')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+' ',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i("#"+l.MOVE)[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),e.shadeo=i("#"+l.SHADE+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),e.shadeo.css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():function(){e.offset(),parseInt(o.getStyle(document.getElementById(l.MOVE),"z-index"))||function(){e.layero.css("visibility","hidden"),r.ready(function(){e.offset(),e.layero.css("visibility","visible")})}()}(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&t.shadeo.on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n,t.index);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n,t.index)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n,t.index)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){t=t||{};var a=i("#"+l[0]+e),s=i("#"+l.SHADE+e),f=a.find(l[1]).outerHeight()||0,c=a.attr("minLeft")||181*o.minIndex+"px",u=a.css("position"),d={width:180,height:f,position:"fixed",overflow:"hidden"};o.record(a),o.minLeft[0]&&(c=o.minLeft[0],o.minLeft.shift()),t.minStack&&(d.left=c,d.top=n.height()-f,a.attr("minLeft")||o.minIndex++,a.attr("minLeft",c)),a.attr("position",u),r.style(e,d,!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),s.hide()},r.restore=function(e){var t=i("#"+l[0]+e),n=i("#"+l.SHADE+e),a=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(a[0]),height:parseFloat(a[1]),top:parseFloat(a[2]),left:parseFloat(a[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e),n.show()},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e,t){var n=i("#"+l[0]+e),a=n.attr("type"),s="layer-anim-close";if(n[0]){var f="layui-layer-wrap",c=function(){if(a===o.type[1]&&"object"===n.attr("conType")){n.children(":not(."+l[5]+")").remove();for(var r=n.find("."+f),s=0;s<2;s++)r.unwrap();r.css("display",r.data("display")).removeClass(f)}else{if(a===o.type[2])try{var c=i("#"+l[4]+e)[0];c.contentWindow.document.write(""),c.contentWindow.close(),n.find("."+l[5])[0].removeChild(c)}catch(u){}n[0].innerHTML="",n.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e],"function"==typeof t&&t()};n.data("isOutAnim")&&n.addClass("layer-anim "+s),i("#layui-layer-moves, #"+l.SHADE+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),n.attr("minLeft")&&(o.minIndex--,o.minLeft.push(n.attr("minLeft"))),r.ie&&r.ie<10||!n.data("isOutAnim")?c():setTimeout(function(){c()},200)}},r.closeAll=function(e,t){"function"==typeof e&&(t=e,e=null);var n=i("."+l[0]);i.each(n,function(a){var o=i(this),s=e?o.attr("type")===e:1;s&&r.close(o.attr("times"),a===n.length-1?t:null),s=null}),0===n.length&&"function"==typeof t&&t()};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return' '}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(t){s=t.find(".layui-layer-input"),s.val(e.value||"").focus(),"function"==typeof f&&f(t)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+" ";i"+t[i].title+"";return a}(),content:''+function(){var e=t.length,i=1,a="";if(e>0)for(a=''+(t[0].content||"no content")+" ";i'+(t[i].content||"no content")+"";return a}()+" ",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=!("string"==typeof t.photos||t.photos instanceof i),f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){h();var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0)}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev(!0)}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext(!0)}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),a&&(t.anim=-1),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0] '+function(){return u.length>1?'":""}()+"",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常 是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){r.ready(),o.run(e.jQuery)}()}(window);
var currentPath = 'http://wenshu.52jianpu.com/libpic/js/';
var tradeHost = 'http://wenshu.52jianpu.com/libpic/cpt/';
var timeNum = '222';//\u7528\u4e8e\u505a\u662f\u5426\u514d\u8d39\u7684\u6807\u8bc6
var PRICE_SUFFIX=1;
var showdl = 1; //1\u4e3a\u663e\u793a -1\u4e3a\u9690\u85cf 0\u4e3a\u9690\u85cf\u5e76\u4e14\u8ba1\u65f6\u5668\u4e0d\u505c\u6b62 \uff08\u4e0b\u8f7d\uff09
var qr = 'rand';
var showgg = -1; //1\u4e3a\u663e\u793a -1\u4e3a\u9690\u85cf
var textLen = 0;
var jsonKey = '';
// var client = new ClientJS();
// var fingerprint = client.getFingerprint();
var fingerprint = "";
var utc = new Date();
var requestSuffix = utc.getUTCFullYear()+"_"+utc.getUTCMonth()+"_"+utc.getUTCDate()+"_"+(Math.floor(utc.getUTCHours()/3));
var checkPayFromEditPlus,checkIsVip;
var globalAType;
var Q_CITY = decodeURIComponent(Cookies.get('q_city') || "");
var panUrl, getQr, payQr, aliPay, countDown, countDownInterval;
var PRICE_PREFIX;
var qMapKeys = ['4X5BZ-7F4HU-3Q6VL-BOOHJ-ROE7V-L6BVG', 'CKMBZ-GH5LF-63LJR-NB5QW-DZ6MV-ACFF6'];
var Q_MAP_KEY = qMapKeys[Math.floor((Math.random()*qMapKeys.length))];
var sourceConf = [
{type:'link', opt:{rel:'stylesheet', href:currentPath + 'css/pc-style.10.css?' + requestSuffix}},
// {type:'script', opt:{src:currentPath + 'chat/js/load_write_ai.js', charset:'utf-8'}},
];
for(var i=0;i\n'+""},paySuccessBox='',scanDiscountBox=function(e,t){return'\n
\n
\n
\n
\n
'+e.art[0]+t+"."+PRICE_SUFFIX+e.art[1]+'
\n
\n
\n
\n '+e.btn[0]+t+"."+PRICE_SUFFIX+e.btn[1]+' \n '+e.btn[2]+' \n \n
\n
\n
\n
'},scanDiscountBoxV2=function(e,t,s){return'\n
\n
\n
\n
已减免'+(t-s)+' 元,还需支付'+s+"."+PRICE_SUFFIX+' 元获得复制权限
\n
\n
\n
\n 关注公众号,减免'+s+"."+PRICE_SUFFIX+'元 \n 微信支付'+s+"."+PRICE_SUFFIX+'元 \n \n
\n
\n
\n
'},scanDiscountLastBox=function(e){return''},scanDiscountQrBox=function(e,t,s){return e+="_03",'\n
\n
关注最后1个公众号
\n
减免'+t+"."+PRICE_SUFFIX+'元 \n
\n
输入复制验证码后可免费 复制 \n
\n \n \n
\n
\n
\n
\n"},customBox='',loginEle='
微信扫码,安全登录
会员登录 打开微信 扫描二维码登录
',title=document.title.substr(0,50),lanmu="",scan=Cookies.get("scan_list")||"",scan_list=scan?scan.split("."):[],qrDis="",ispaying=!1,buyState=payvipInterval=null,loadQrImg=currentPath+"img/wxzhifu_load.gif",qrISGet=!1,lanmuArr=[],sideBarEle=document.getElementsByClassName("sidebar")[0];function getQrCode(){$.ajax({url:tradeHost+"v1/trade/qr/free.2",data:{title:title,scan:scan,fp:fingerprint,fpact:"r",city:Q_CITY,lanmu:lanmu,referer:ARTICLE_URL,k:Math.random()},method:"GET",timeout:3e3,success:function(e){qrISGet=!0,-1<(qr="ALL_SCANNED"!==e.qr?e.qr:qr).indexOf("http://")?(panUrl=qr,$(".codebox").css("display","none"),$(".codeboxv2").css("display","block")):($(".codebox_qrcode").attr("src",currentPath+"qr/"+qr+".jpg?"+requestSuffix),0><\/code>/g)||[]:lanmuArr).splice(0,1),lanmu=$(""+lanmuArr.join("")+"
").text()||"",$.ajax({url:currentPath+"json/"+jsonFileName+"?"+requestSuffix,async:!1,dataType:"json",success:function(e){price=e.price+"."+PRICE_SUFFIX,goods=e.goods,goodsDis=e.goodsDis,vipGoods=e.vipGoods,CODE_DIS=e.codeDis||[],CODE_PASS=e.codePass||[];for(var t=setTimeout(function(){timeNum="222",clearTimeout(t)},e.time),s=e.queList,i="",a=0;a '+s[a].que+'
'+s[a].ans+"
";var o=e.alert,n=document.querySelector(".content").querySelectorAll("h2").length;price="-";for(var n="
付费复制"+(n?'(共'+n+"篇) ":"")+"
《"+($("h1.title").text()||document.title)+"》
微信扫码支付
"+o.price[0]+""+price+" 元/篇 "+o.price[2]+" 会员登录 联系客服
会员包月
30天内全站所有内容 都可以复制下载
微信扫码支付
"+o.price[0]+""+price+" 元/月 原价:30元 我要购买单篇
写作犯难?不想自己动手?
微信添加我为好友,把您的写作需求告诉我 我来帮您写文章,让您省心又省力!
微信扫码添加我为好友 把您的写作需求告诉我
",c="",a=0;a'+vipGoods[a][1]+" ¥"+vipGoods[a][2]+"原价¥"+vipGoods[a][3]+"
";o='";$("body").append(n+payBox(e.priceDis)+paySuccessBox+customBox+loginEle+o+scanDiscountBoxV2(e.alertDis,e.price,e.priceDis)+scanDiscountQrBox(qr,e.priceDis,e.codeDis)),$(".customer_service_box ul").append(i),$(".pay_mask .pay_qrcode img").attr("src",loadQrImg),$(".pay_mask").bind("beforeShow",function(){$(".discount_price_txt",this).css("display",useDis?"block":"none")})}}),payQr=function(){var s;if(-1点击访问原网址:'+s+" ",yes:function(e,t){window.location.href=s}});ispaying||(ispaying=!0,clearInterval(buyState),$(".copy_mask .paybox-qr img").attr("src",loadQrImg),$.ajax({url:getCopyPayUrl(),data:{id:useDis?goodsDis:goods,ps:PRICE_SUFFIX,rd:ARTICLE_URL,title:title,referer:ARTICLE_URL,city:Q_CITY,k:Math.random()},method:"GET",dataType:"JSON",timeout:1e4,success:function(t){$(".copy_mask .paybox-qr img").attr("src",t.src),$(".copy_mask .paybox-money-int").data("price",t.price).text(t.msg),buyState=setInterval(function(){$.getJSON(tradeHost+"v1/trade/copytext/"+t.app+"/"+t.order+"?"+Math.random(),function(e){"OK"===e.state&&(log({type:"pay",value:t.app+t.order}),$(".mask").hide(),$(".buy_success").show(),Cookies.set(payCookieKey,1,{expires:1,path:"/"}),Cookies.set(qrCookieKey,1,{expires:1,path:"/"}),ispaying=!1,"function"==typeof paySuccessEditPlusCallback&&paySuccessEditPlusCallback({type:t.app+" pay",res:t}),clearInterval(buyState))})},2500)}}))},getQr=function(){qrISGet||$.ajax({url:tradeHost+"v1/trade/qr/free.2",data:{title:title,scan:scan,fp:fingerprint,fpact:"r",city:Q_CITY,lanmu:lanmu,referer:ARTICLE_URL,k:Math.random()},method:"GET",timeout:3e3,success:function(e){var t,s;qrISGet=!0,globalAType=e.a_type,s="n"!=e.sp?(s="http://pan.ruiwen.com/#"+(t=e.sp.split("_"))[1],-1.excellent_articles_box,.content img[src*="/00/"]{display:none;} '):"",$(".content").prepend(s),showdl="y"===e.dl?1:-1,"ALL_SCANNED"!==e.qr&&(qr=e.qr),-1<(qr="_t20240308").indexOf("http://")?(panUrl=qr,$(".codebox").css("display","none"),$(".codeboxv2").css("display","block")):($(".codebox_qrcode").attr("src",currentPath+"qr/"+qr+".jpg?"+requestSuffix),0恭喜,已优惠'+e+" 元 "),$(".pay_mask .paybox-art").text("只要支付"+t.msg+"元,即可复制"),$(".pay_mask .paybox-qr img").attr("src",t.src),$(".pay_mask .paybox-money .paybox-money-int").text(t.msg),$(".pay_mask").show(),buyState=setInterval(function(){$.getJSON(tradeHost+"v1/trade/copytext/"+t.app+"/"+t.order+"?"+Math.random(),function(e){"OK"===e.state&&(log({type:"pay",value:t.app+t.order}),$(".mask").hide(),$(".buy_success").show(),Cookies.set(payCookieKey,1,{expires:1,path:"/"}),Cookies.set(qrCookieKey,1,{expires:1,path:"/"}),ispaying=!1,"function"==typeof paySuccessEditPlusCallback&&paySuccessEditPlusCallback({type:t.app+" pay",res:t}),clearInterval(buyState))})},2500)},complete:function(){}}))});function vipPay(e,t,s){clearInterval(payvipInterval),$.ajax({url:tradeHost+"v1/wechat/vip/pay/copy/"+e,data:{ps:t,rd:ARTICLE_URL,title:title,referer:ARTICLE_URL,city:Q_CITY,k:Math.random()},method:"GET",dataType:"JSON",timeout:1e4,success:function(e){var t;"OK"===e.state&&(t=e.order,s(e),payvipInterval=setInterval(function(){$.ajax({url:tradeHost+"v1/wechat/vip/pay/state/"+t+"?"+Math.random(),success:function(e){"OK"===e.state&&(Cookies.set("userid",e.data.id+"|"+e.data.username,{expires:7,path:"/"}),Cookies.set("utoken",e.token,{expires:7,path:"/"}),Cookies.set("uexpired",e.expired,{expires:7,path:"/"}),$(".login_success .expire_tip1").text("会员"+timeToStr(e.data.expired)+"到期"),$(".login_success .login_success_btn").show(),$(".login_success .openvip").hide(),$(".goods_menu_mask").hide(),$(".wx_login_marks").show(),$(".wx_login_marks .wx_item_group").hide(),$(".wx_login_marks .login_success").show(),"function"==typeof paySuccessEditPlusCallback&&paySuccessEditPlusCallback({type:"vip pay",res:e}),Cookies.set(vipCookieKey,1,{expires:7,path:"/"}),clearInterval(payvipInterval))}})},2e3))}})}function codeSuccess(){$(".mask").hide(),layer.msg("恭喜您!复制验证码正确,您已获得VIP免费复制权限,马上复制吧!",{icon:6,time:800}),log({type:"code",value:qr},function(e){Cookies.set(qrCookieKey,1,{expires:1}),scan_list.indexOf(qr)<0&&(scan_list.push(qr),Cookies.set("scan_list",scan_list.join("."),{expires:30,path:"/"}))})}function getQueryVariable(e){for(var t=window.location.search.substring(1).split("&"),s=0;s"
+".author_btn { max-width: 300px; }"
+".ai_box {padding: 7% 5%;background: #fff8ea;border: 1px solid #f3f3f3;border-radius: 10px;text-align: center;width: 90%;}"
+".ai_box-top {width: 215px;height: 40px;overflow: hidden;float: left;border-radius: 8px;line-height: 40px;text-align: left;}"
+".ai_box-top i{float: left;width: 30px;height: 30px;display: inline-block;background: url(http://wenshu.52jianpu.com/libpic/cpt/img/ds/ds_pen.png) no-repeat 0px 0px;background-size: 100%;margin: 8px;}"
+".ai_box_art {float: left;text-align: left;margin-top: 8px;width: 100%;}"
+".ai_box-top h4 {font-size: 28px;}"
+".ai_box_art b {font-size: 16px;color: red;font-weight:unset;margin-top: 5px;line-height: 56px;}"
+".ai_box_art p {font-size: 15px;color: #898989;line-height: 27px;text-decoration: underline;}"
+".ai_box_ico{cursor: pointer;display: inline-block;background: #ef9901;padding: 12px;color: #ffffff;border-radius: 8px;width: 272px;margin-top: -2px;font-size: 19px;font-weight: 400;margin-top: 15px;}"
+".ai_box_ico:hover {background: #e59200;}"
+".ai_mask.ai_mask_hide{display: none;}"
+".ai_mask{display: table-cell;height: 100%;width: 100%;top: 0;left: 0;background: rgba(0, 0, 0, 0.6);text-align: center;vertical-align: middle;position: fixed;z-index: 9;}"
+".ai_mask_box{width: 332px;height: 326px;background: #fff;margin: 249px auto 0;border-radius: 15px;position: relative;}"
+".ai_mask_box_art{height: 60px;background: #2975e5;color:#fff;line-height: 60px;font-size: 24px;border-radius: 14px 14px 0 0;text-align: center;}"
+".ai_mask_tp{width:160px;height:160px;margin: auto;border: 1px solid #e7e7e7;display: inline-block;}"
+".ai_mask_tp img{width:100%;height:100%;}"
+".ai_mask_sm{font-size: 16px;color: #44b449;text-align: center;margin-top: 3px;position: relative;}"
+".ai_mask_sm span{color:#ff7800;;}"
+".ai_mask_box .close{position: absolute;right: -10px;background: #767676;width: 28px;height: 28px;text-indent: -9999px;top: -10px;cursor: pointer;border-radius: 60px;border: 3px solid #fff;}"
+".ai_mask_box .close:before{content:'';position: absolute;width: 3px; height: 17px; background: #fff;display: inline-block;left: 13px;-webkit-transform: rotate(45deg);border-radius: 4px;top: 5px;transition: rotate(45deg);}"
+".ai_mask_box .close:after{ content: '';position: absolute;width: 3px;height: 17px;background: #fff;display: inline-block;left: 13px;-webkit-transform: rotate(313deg);border-radius: 4px;top: 5px;transition: rotate(45deg);}"
+".ai_mask_box .close:hover{background:#2196F3}"
+".ai_mask_box_li{float: left;width: 100%;margin: 17px 0;}"
+".ai_mask_box_li span{background: #dfecff;color: #2975e5;line-height: 26px;height: 26px;display: inline-block;width: 79px;text-align: center;font-size: 14px;margin: 0 3px;border-radius: 60px;}"
+""
+aiBoxBtnHtml
+""
+"
"
+"
ai\u5E2E\u4F60\u5199\u6587\u7AE0
"
+"
"
+" \u4E00\u952E\u751F\u6210 "
+" \u9AD8\u8D28\u91CF "
+" \u4E0D\u91CD\u590D "
+"
"
+"
"
+"
\u5FAE\u4FE1\u626B\u7801\uFF0C\u5373\u53EF\u4F53\u9A8C
"
+"
"
+"
"
+"
";
}
var aiBoxB = ' '
+ '
'
+ '
\u8D44\u6DF1\u5199\u624B \u2022 1\u5BF91\u670D\u52A1 '
+ '
\u6587\u7AE0\u4EE3\u5199\u670D\u52A1 \u54C1\u8D28\u4FDD\u8BC1\u3001\u539F\u521B\u9AD8\u6548\u3001\u91CF\u8EAB\u5B9A\u5236\u6EE1\u8DB3\u60A8\u7684\u9700\u6C42
'
+ '
\u70B9\u51FB\u4F53\u9A8C
';
if(1 || window.location.href.indexOf('iwen.c') > 0){
if(!document.getElementsByClassName('ai_box_r')[0]){
/* ai_box
$('.after_right_top').before(aiBox(
""
+"
"
+"
\u6587\u7AE0\u4EE3\u5199\u670D\u52A1 "
+" "
+"
"
+"
\u8D44\u6DF1\u5199\u624B · \u5E2E\u60A8\u5199\u6587\u7AE0 "
+"
\u54C1\u8D28\u4FDD\u8BC1\u3001\u539F\u521B\u9AD8\u6548\u3001\u91CF\u8EAB\u5B9A\u5236\u6EE1\u8DB3\u60A8\u7684\u9700\u6C42
"
+"
"
+"
\u70B9\u51FB\u4F53\u9A8C
"
+"
"
));
*/
if(document.querySelector('.content').innerText.indexOf('\u8BBA\u6587') > -1){
$('.right_conttop_download').after(aiBox(
""
+"
"
+"
\u8BBA\u6587-AI\u81EA\u52A8\u751F\u6210\u5668 "
+" "
+"
"
+"
\u4E07\u5B57\u8BBA\u6587 \u4E00\u952E\u751F\u6210 "
+"
\u8F93\u5165\u9898\u76EE \u4E00\u952E\u641E\u5B9A\u6BD5\u4E1A\u8303\u6587\u6A21\u677F AI\u539F\u521B \u4F4E\u91CD\u590D\u7387 \u9644\u8D60\u67FB\u91CD\u62A5\u544A
"
+"
"
+"
\u70B9\u51FB\u751F\u6210
"
+"
"
));
}
/* ai_box
$('.after_height_light').after(aiBoxB);
*/
}
$(document).on('click', '.ai_box_btn', function(){
var href = $(this).data('href');
if(href){
const bdLink = document.createElement('a');
bdLink.target = "_blank";
bdLink.href = href;
bdLink.click();
}else{
layer.open({
type: 1,
offset: 200,
title: false,
content: ''
+ '
\u6587\u7AE0\u4EE3\u5199\u670D\u52A1
'
+ '
\u6700\u5FEB1\u5C0F\u65F6\u51FA\u7A3F\uFF0C\u5305\u539F\u521B\uFF0C\u5305\u6EE1\u610F\uFF01 '
+ '
'
+ '
\u5FAE\u4FE1\u626B\u7801\u6DFB\u52A0\u6211\u4E3A\u597D\u53CB\u8D44\u6DF1\u5199\u624B \u5E2E\u60A8\u5199\u6587\u7AE0 ',
});
}
});
}
}
var myAbTest = myAbTest || ABTest({
name: "ab_test",
customVarSlot: 1,
variations: {
a:function () {
jsonFileName = 'pc/alert.5.a.json';
if(0 && window.location.host.indexOf('js.c') > -1){
loadScript({src:'/static/cpt/contribution/js/wangEditor/index.min.js', charset:'utf-8'},
function(){loadScript({src:'/static/cpt/contribution/js/common_client.js', charset:'utf-8'},
function(){loadScript({src:'/static/cpt/contribution/js/content_editing.js', charset:'utf-8'},
function(){
// loadScript({src:currentPath + 'chat/js/chat.js', charset:'utf-8'});
}
)}
)})
}
// if(window.location.search.indexOf('cpt_json_test') > -1){
// jsonFileName = 'test/alert.test.a.edit.json';
// }
console.log('is a');
jsonKey='a';
PRICE_PREFIX=99;
// if(window.location.host.indexOf('ys.c') > -1){
runCpt();
// }else{
// runCpt();
// }
getQr();
aiBox();
},
b:function () {
jsonFileName = 'pc/alert.5.b.json';
if(window.location.host.indexOf('js.c') > -1){
if(document.querySelector('.content')){
document.querySelector('.content').className = "content scrollable";
}
}
// if(window.location.search.indexOf('cpt_json_test') > -1){
// jsonFileName = 'test/alert.test.b.edit.json';
// }
console.log('is b');
jsonKey='b';
// PRICE_PREFIX=97;
PRICE_PREFIX=99;
// if(window.location.host.indexOf('ys.c') > -1){
runCpt();
// }else{
// runCpt();
// }
getQr();
aiBox();
},
}
});
var showDldocOk = false;
var newHtml = $('');
var starImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAY1BMVEUAAAD/mAD/mgD/mQD/mQD/mQD/mQD/mAD/mQD/mQD/mQD//wD/mQD/mAD/nwD/mQD/mAD/mQD/mQD/mgD/mAD/mQD/mAD/mAD/mQD/mgD/mQD/mgD/lwD/mQD/lQD/mwD/mQAl+fFuAAAAIHRSTlMA7ytS5M++uGk2JAGqjAzr1ZKFR/agl005MMxiYF8YF49KoKIAAAC9SURBVDjLlZJZCsMwDETl2vEWZ9+76v6nrAkhYCUR7fsyzGNgsOBP8mHIWUEiSragRqxzvoBW0IJIxhdEpkshQ2QrJtzomIKritK9WoM7pni6EjZm22iFJyjdWAcgkUWCF1wuPMAimPwGkZvgcmrQnDOqmFOD5pxReUiwVLCQUlChIIKhgiGCooIiv4kHykSYj4I7HdG3bb89H4nQ4Mr4AXiPZzM0RoKHFR/WGXSEXmDHaToj3Mkld1mA3/gCrXs1vl7stYYAAAAASUVORK5CYII=';
/*\u4e0b\u8f7d\u5361\u7247\u653e\u7f6e*/
if(document.querySelector('.after_height_light_second_floor ~ p')){
document.querySelector('.after_height_light_second_floor ~ p').className = 'rel_art_line';
}
document.addEventListener('DOMContentLoaded',function(){
var dlBoxHtml = '
'
+ '
'
+ '
\u4E00\u952E\u590D\u5236\u5168\u6587
'
+ '
\u4E0B\u8F7D\u5168\u6587
'
+ '
\u6295\u8BC9 '
+ '
'
+ '
';
var newHtmlStop = false;
$(newHtml).css({position:'fixed', top:'-10000px', right:'-10000px', width:'800px'});
$(newHtml).attr('id', 'article_text_cpt');
$('body').append($(newHtml)[0].outerHTML);
if(document.getElementsByClassName('content')){
document.getElementsByClassName('content')[0].childNodes.forEach(function(ele){
if(newHtmlStop) return;
newHtmlStop = ele.nodeName.toLowerCase() !== '#text' && ele.className.indexOf('after_height_light') > -1;
if(newHtmlStop) return;
if(ele.nodeName.toLowerCase() === '#text'){
var html = ele.textContent;
}else{
var html = ele.outerHTML;
if(html.toLowerCase().indexOf('') > -1) return;
}
$('#article_text_cpt').append(html);
})
}
if(!showDldocOk){
showDldocOk = true;
// var showdltimer = setInterval(function () {
// if(showdl && showdl === 1){
$(document).on('click','.download_fixed_fuzhi,.fuzhi_all_btn',function (e) {
selectText(document.getElementById('article_text_cpt'));
document.execCommand('copy');
});
// if(window.location.host.indexOf('ys.c') > -1){
// $(".after_height_light").after(dlBoxHtml);
// }
// $('.download_fixed_fuzhi').css('display', 'none');
// $('.download_fixed_toushi').css('display', 'none');
if(tradeHost.indexOf('ddnx')>-1){
$('.download_fixed').css('display', 'none');
}else if(jsonKey == 'b'){
$('.download_card_box').addClass('download_card_box_ext_bg_img');
}
if(typeof BD_MEDIUM_ID !== 'undefined'){
// var dlRBottomHtml = '
\u4E0B\u8F7D\u6587\u6863
';
var dlRBottomHtml = '
\u5728\u7EBF\u54A8\u8BE2
';
$('.content').append(dlRBottomHtml);
$('body').append('
');
$(document).on('click', '#bd_ai_chat', function(){
if(document.querySelector('#edu-bot-iframe')){
document.querySelector('#edu-bot-iframe').style.display='block';
}else{
const iframe = document.createElement('iframe');
iframe.src = 'http://aibqt.baidu.com/edu-bot/';
iframe.id = 'edu-bot-iframe';
iframe.style = 'border:0px;width:375px;height:100%';
document.getElementById('edu-bot-container').style.display = 'block';
document.getElementById('edu-bot-container').appendChild(iframe);
}
});
}else{
$('.content').append(dlRBottomHtml);
$('body').append('
');
/*
$(document).on('click', '#bd_ai_chat', function(){
layer.open({
type: 1,
offset: 200,
title: false,
content:'
'
+'
\u6587\u7AE0\u4EE3\u5199\u670D\u52A1 '
+'
\u54C1\u8D28\u4FDD\u8BC1\u3001\u9AD8\u6548\u539F\u521B\u3001\u91CF\u8EAB\u5B9A\u5236\u6EE1\u8DB3\u60A8\u7684\u9700\u6C42 '
+'
\u5FAE\u4FE1\u626B\u7801\uFF0C\u5373\u53EF\u4F53\u9A8C ',
});
});
*/
}
$('.download_fixed_down').css('display', 'block');
var pathname = location.pathname;
var star = 0;
for (var i = 0; i < pathname.length; i++) {
star = parseInt(star) + parseInt(pathname.charCodeAt(i));
}
var str = ''; //\u51e0\u9897\u661f\u8bbe\u7f6e
for (i = 0; i < 5; i++) {
str += '
\n';
}
var lala = 'http://' + location.host.replace(/^(m\.|mip\.)/, 'www.');
var r = Math.random();
var d = ''+
'
\n' +
'
\n' +
' \n' +
'
\u300a' + document.title + '.doc\u300b
\n' +
'
\u5c06\u672c\u6587\u7684Word\u6587\u6863\u4e0b\u8f7d\u5230\u7535\u8111\uff0c\u65b9\u4fbf\u6536\u85cf\u548c\u6253\u5370
\n' +
'
\n' +
' \u63a8\u8350\u5ea6\uff1a \n' + str +
'
\n' +
'
\n' +
' \n' +
'
\n' +
'
\n' +
'
\u70b9\u51fb\u4e0b\u8f7d\u6587\u6863
\n' +
'
\n' +
'
\n' +
' ';
$(document).on('click','.download_card_box',function (e) {
var type = $(this).data('type');
var printParam = '';
if(type == 'print'){
printParam = '&view=print';
}
var pos = $(this).data('pos');
window.open(lala + '/dldoc/index.html?'+r+timeNum+'&pos='+pos+'&url='+pathname+'&jk='+jsonKey+'&ps='+PRICE_PREFIX+printParam, '_blank');
});
var flag = true;
/*\u4ee5\u4e0b\u76ee\u5f55\u4e0d\u653e\u7f6e*/
var bmd = ['/jianlixiazai/','/company/','/zhaopin/','/mingqi/','/gaoxiao/','/sydwzp/','/xuanjianghui/','/zhaopinhui/','/ftp/','ask','/zi/','/ci/'];
var reg = /\d+\.(htm)/
for(var i = 0; i < bmd.length;i++){
if(location.href.indexOf(bmd[i]) != -1 || !reg.test(location.href)){
flag = false;
break;
}
}
/* var rand_time = new Date().getTime() / 1000;
rand_time = rand_time - rand_time % (2 * 3600); //\u5168\u5c40\u65f6\u95f4\u6233 \u4e24\u4e2a\u5c0f\u65f6
if(showgg === 1){
var ggstr = '
';
$(".content").after(ggstr);
}*/
htmlText = '';
if($(".content").length > 0){
var html = $(".content").html();
html = html.replace(/
'
+'');
}
}
}
*/
// },1000)
}
// excellentArticles();
/***/
getRightList(insertRightListHtml);
/***/
});
function getCopyPayUrl(){
var PAY_URI_BASE = 'v1/wechat/normal/pay/app/';
var payUri = PAY_URI_BASE + 'copy';
if(window.location.pathname.indexOf('/dldoc') === 0){
payUri = PAY_URI_BASE + 'dlpy';
}
return tradeHost + payUri;
}
function getCity(callback){
var windowHeight = $(window).height();
var copyAlertTopLeft = 495 + 230 - windowHeight;
if(copyAlertTopLeft > 0 && windowHeight > 0){
$('.copy_mask .copy-alert').css('margin', (230>copyAlertTopLeft?230-copyAlertTopLeft:0)+'px auto');
}
if(typeof callback === 'function'){
callback()
}
return;
if(Q_CITY) {
if(typeof callback === 'function'){
callback()
}
return;
}
$.ajax({
url: 'http://apis.map.qq.com/ws/location/v1/ip',
data: {key: Q_MAP_KEY,output: 'jsonp'},
dataType: "jsonp",
timeout: 3000,
success: function (res) {
if (res.status === 0) {
if (res.result.ad_info) {
var areaData = {};
if(res.result.ad_info.province) areaData[res.result.ad_info.province] = 1;
if(res.result.ad_info.city) areaData[res.result.ad_info.city] = 1;
if(res.result.ad_info.district) areaData[res.result.ad_info.district] = 1;
var qCity = "";
for(var i in areaData){
qCity += i;
}
Q_CITY = qCity;
Cookies.set('q_city', encodeURIComponent(Q_CITY), {expires:60,path:"/"});
}
}
},
complete: function () {
if(typeof callback === 'function'){
callback()
}
}
})
}
function getRightList(callback){
//1、获取页面标题
var title="";
if(document.querySelector("h1.title")){
title = document.querySelector("h1.title").textContent;
}else if(document.querySelector("div#title")){
title = document.querySelector("div#title").textContent;
}
title = title.replace(/\d+[\u6761\u7BC7\u53E5]/, '');
console.log("title:" + title);
//2、通过标题请求接口获取其他文章
var article_list = [];
var api_url = "http://wenshu.52jianpu.com/libpic/cpt/sp/res/best_kds/?nhl=1&keyword="+title+"&page=1&v=3";
api_url = encodeURI(api_url);
// console.log(api_url);
$.ajax({
url: api_url,
method:"GET",
data:{},
dataType: 'json',
success:function(data){
// console.log(data);
if (data['code'] == 0) {
article_list = data.data;
//3、将文章进行数据处理,包含去中括号等,数量等。
article_list = article_list.slice(0,10);
for (var i = 0; i < article_list.length; i++) {
article_list[i]['title'] = article_list[i]['title'].replace(/\u3010.*\u3011/g,"");
}
callback(article_list);
}else{
console.log(data);
}
},
error: function(data){
console.log("非json数据");
}
})
}
//插入文章到页面
function insertRightListHtml(article_list = []){
if (article_list == []) { return; }
var li_html = '';
for (let m = 0; m < article_list.length; m++) {
var title = article_list[m]["title"];
if(article_list[m]['highlight'] && article_list[m]['highlight']['title'] && article_list[m]['highlight']['title'][0]){
title = article_list[m]['highlight']['title'][0];
title = title.replace(//g, '');
title = title.replace(/<\/em>/g, ' ');
}
var sort = m + 1;
li_html = li_html +
''+sort+' '+ title +' ';
}
var html ='';
$(".after_right_top").after(html);
}
function excellentArticles(){
if($('.excellent_articles_box')[0]){
return;
}
var keyword = $('h1.title').text();
var randKey = new Date().getTime() / 1000;
randKey = randKey - randKey % 86400;
var starHtml = '';
for (var i = 0; i < 5; i++) {
starHtml += ' \n';
}
$.get('/static/cpt/excellent/article', {keyword:keyword, randKey:randKey}, function(res){
if(res.code !== 0) return;
if(!res.data || res.data.length < 1) return;
var data = res.data;
var html = '';
if(jsonKey === 'a'){
$('.content').prepend(html);
}else{
$('.after_height_light_second_floor').after(html);
}
});
}
function hashCode(s) {
var h = 0, l = s.length, i = 0;
if (l > 0)
while (i < l)
h = (h << 5) - h + s.charCodeAt(i++) | 0;
return h;
}
function selectText(node) {
if (document.body.createTextRange) {
var range = document.body.createTextRange();
range.moveToElementText(node);
range.select();
} else if (window.getSelection) {
var selection = window.getSelection();
var range = document.createRange();
range.selectNodeContents(node);
selection.removeAllRanges();
selection.addRange(range);
} else {
console.warn("Could not select text in node: Unsupported browser.");
}
}
function timeToStr(timestamp){
var date = new Date(timestamp*1000);
Y = date.getFullYear();
M = date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1;
D = date.getDate();
h = date.getHours();
m = date.getMinutes();
s = date.getSeconds();
return Y+'-'+M+'-'+D+' '+h+':'+m+':'+s;
}
function insertBefore(newNode, referenceNode) {
referenceNode.parentNode.insertBefore(newNode, referenceNode);
}
function appendChild(newNode, referenceNode) {
referenceNode.appendChild(newNode);
}
function loadScript(opt, callback){
var s,r,t;
r = false;
s = document.createElement('script');
s.type = 'text/javascript';
for(var ii in opt){
s[ii] = opt[ii];
}
s.onload = s.onreadystatechange = function() {
//console.log( this.readyState ); //uncomment this line to see which ready states are called.
if ( !r && (!this.readyState || this.readyState == 'complete') ){
r = true;
if(typeof callback === 'function') callback();
}
};
t = document.getElementsByTagName('script')[0];
t.parentNode.insertBefore(s, t);
}
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
//##########################--------##########################
//##########################--------##########################
//##########################--------##########################
'qrCode';var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this.parsedData=[];for(var b=[],d=0,e=this.data.length;e>d;d++){var f=this.data.charCodeAt(d);f>65536?(b[0]=240|(1835008&f)>>>18,b[1]=128|(258048&f)>>>12,b[2]=128|(4032&f)>>>6,b[3]=128|63&f):f>2048?(b[0]=224|(61440&f)>>>12,b[1]=128|(4032&f)>>>6,b[2]=128|63&f):f>128?(b[0]=192|(1984&f)>>>6,b[1]=128|63&f):b[0]=f,this.parsedData=this.parsedData.concat(b)}this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function b(a,b){this.typeNumber=a,this.errorCorrectLevel=b,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function i(a,b){if(void 0==a.length)throw new Error(a.length+"/"+b);for(var c=0;c=f;f++){var h=0;switch(b){case d.L:h=l[f][0];break;case d.M:h=l[f][1];break;case d.Q:h=l[f][2];break;case d.H:h=l[f][3]}if(h>=e)break;c++}if(c>l.length)throw new Error("Too long data");return c}function s(a){var b=encodeURI(a).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return b.length+(b.length!=a?3:0)}a.prototype={getLength:function(){return this.parsedData.length},write:function(a){for(var b=0,c=this.parsedData.length;c>b;b++)a.put(this.parsedData[b],8)}},b.prototype={addData:function(b){var c=new a(b);this.dataList.push(c),this.dataCache=null},isDark:function(a,b){if(0>a||this.moduleCount<=a||0>b||this.moduleCount<=b)throw new Error(a+","+b);return this.modules[a][b]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var d=0;d=7&&this.setupTypeNumber(a),null==this.dataCache&&(this.dataCache=b.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,b){for(var c=-1;7>=c;c++)if(!(-1>=a+c||this.moduleCount<=a+c))for(var d=-1;7>=d;d++)-1>=b+d||this.moduleCount<=b+d||(this.modules[a+c][b+d]=c>=0&&6>=c&&(0==d||6==d)||d>=0&&6>=d&&(0==c||6==c)||c>=2&&4>=c&&d>=2&&4>=d?!0:!1)},getBestMaskPattern:function(){for(var a=0,b=0,c=0;8>c;c++){this.makeImpl(!0,c);var d=f.getLostPoint(this);(0==c||a>d)&&(a=d,b=c)}return b},createMovieClip:function(a,b,c){var d=a.createEmptyMovieClip(b,c),e=1;this.make();for(var f=0;f=g;g++)for(var h=-2;2>=h;h++)this.modules[d+g][e+h]=-2==g||2==g||-2==h||2==h||0==g&&0==h?!0:!1}},setupTypeNumber:function(a){for(var b=f.getBCHTypeNumber(this.typeNumber),c=0;18>c;c++){var d=!a&&1==(1&b>>c);this.modules[Math.floor(c/3)][c%3+this.moduleCount-8-3]=d}for(var c=0;18>c;c++){var d=!a&&1==(1&b>>c);this.modules[c%3+this.moduleCount-8-3][Math.floor(c/3)]=d}},setupTypeInfo:function(a,b){for(var c=this.errorCorrectLevel<<3|b,d=f.getBCHTypeInfo(c),e=0;15>e;e++){var g=!a&&1==(1&d>>e);6>e?this.modules[e][8]=g:8>e?this.modules[e+1][8]=g:this.modules[this.moduleCount-15+e][8]=g}for(var e=0;15>e;e++){var g=!a&&1==(1&d>>e);8>e?this.modules[8][this.moduleCount-e-1]=g:9>e?this.modules[8][15-e-1+1]=g:this.modules[8][15-e-1]=g}this.modules[this.moduleCount-8][8]=!a},mapData:function(a,b){for(var c=-1,d=this.moduleCount-1,e=7,g=0,h=this.moduleCount-1;h>0;h-=2)for(6==h&&h--;;){for(var i=0;2>i;i++)if(null==this.modules[d][h-i]){var j=!1;g>>e));var k=f.getMask(b,d,h-i);k&&(j=!j),this.modules[d][h-i]=j,e--,-1==e&&(g++,e=7)}if(d+=c,0>d||this.moduleCount<=d){d-=c,c=-c;break}}}},b.PAD0=236,b.PAD1=17,b.createData=function(a,c,d){for(var e=j.getRSBlocks(a,c),g=new k,h=0;h8*l)throw new Error("code length overflow. ("+g.getLengthInBits()+">"+8*l+")");for(g.getLengthInBits()+4<=8*l&&g.put(0,4);0!=g.getLengthInBits()%8;)g.putBit(!1);for(;;){if(g.getLengthInBits()>=8*l)break;if(g.put(b.PAD0,8),g.getLengthInBits()>=8*l)break;g.put(b.PAD1,8)}return b.createBytes(g,e)},b.createBytes=function(a,b){for(var c=0,d=0,e=0,g=new Array(b.length),h=new Array(b.length),j=0;j=0?p.get(q):0}}for(var r=0,m=0;mm;m++)for(var j=0;jm;m++)for(var j=0;j=0;)b^=f.G15<=0;)b^=f.G18<>>=1;return b},getPatternPosition:function(a){return f.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,b,c){switch(a){case e.PATTERN000:return 0==(b+c)%2;case e.PATTERN001:return 0==b%2;case e.PATTERN010:return 0==c%3;case e.PATTERN011:return 0==(b+c)%3;case e.PATTERN100:return 0==(Math.floor(b/2)+Math.floor(c/3))%2;case e.PATTERN101:return 0==b*c%2+b*c%3;case e.PATTERN110:return 0==(b*c%2+b*c%3)%2;case e.PATTERN111:return 0==(b*c%3+(b+c)%2)%2;default:throw new Error("bad maskPattern:"+a)}},getErrorCorrectPolynomial:function(a){for(var b=new i([1],0),c=0;a>c;c++)b=b.multiply(new i([1,g.gexp(c)],0));return b},getLengthInBits:function(a,b){if(b>=1&&10>b)switch(a){case c.MODE_NUMBER:return 10;case c.MODE_ALPHA_NUM:return 9;case c.MODE_8BIT_BYTE:return 8;case c.MODE_KANJI:return 8;default:throw new Error("mode:"+a)}else if(27>b)switch(a){case c.MODE_NUMBER:return 12;case c.MODE_ALPHA_NUM:return 11;case c.MODE_8BIT_BYTE:return 16;case c.MODE_KANJI:return 10;default:throw new Error("mode:"+a)}else{if(!(41>b))throw new Error("type:"+b);switch(a){case c.MODE_NUMBER:return 14;case c.MODE_ALPHA_NUM:return 13;case c.MODE_8BIT_BYTE:return 16;case c.MODE_KANJI:return 12;default:throw new Error("mode:"+a)}}},getLostPoint:function(a){for(var b=a.getModuleCount(),c=0,d=0;b>d;d++)for(var e=0;b>e;e++){for(var f=0,g=a.isDark(d,e),h=-1;1>=h;h++)if(!(0>d+h||d+h>=b))for(var i=-1;1>=i;i++)0>e+i||e+i>=b||(0!=h||0!=i)&&g==a.isDark(d+h,e+i)&&f++;f>5&&(c+=3+f-5)}for(var d=0;b-1>d;d++)for(var e=0;b-1>e;e++){var j=0;a.isDark(d,e)&&j++,a.isDark(d+1,e)&&j++,a.isDark(d,e+1)&&j++,a.isDark(d+1,e+1)&&j++,(0==j||4==j)&&(c+=3)}for(var d=0;b>d;d++)for(var e=0;b-6>e;e++)a.isDark(d,e)&&!a.isDark(d,e+1)&&a.isDark(d,e+2)&&a.isDark(d,e+3)&&a.isDark(d,e+4)&&!a.isDark(d,e+5)&&a.isDark(d,e+6)&&(c+=40);for(var e=0;b>e;e++)for(var d=0;b-6>d;d++)a.isDark(d,e)&&!a.isDark(d+1,e)&&a.isDark(d+2,e)&&a.isDark(d+3,e)&&a.isDark(d+4,e)&&!a.isDark(d+5,e)&&a.isDark(d+6,e)&&(c+=40);for(var k=0,e=0;b>e;e++)for(var d=0;b>d;d++)a.isDark(d,e)&&k++;var l=Math.abs(100*k/b/b-50)/5;return c+=10*l}},g={glog:function(a){if(1>a)throw new Error("glog("+a+")");return g.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;a>=256;)a-=255;return g.EXP_TABLE[a]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},h=0;8>h;h++)g.EXP_TABLE[h]=1<h;h++)g.EXP_TABLE[h]=g.EXP_TABLE[h-4]^g.EXP_TABLE[h-5]^g.EXP_TABLE[h-6]^g.EXP_TABLE[h-8];for(var h=0;255>h;h++)g.LOG_TABLE[g.EXP_TABLE[h]]=h;i.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var b=new Array(this.getLength()+a.getLength()-1),c=0;cf;f++)for(var g=c[3*f+0],h=c[3*f+1],i=c[3*f+2],k=0;g>k;k++)e.push(new j(h,i));return e},j.getRsBlockTable=function(a,b){switch(b){case d.L:return j.RS_BLOCK_TABLE[4*(a-1)+0];case d.M:return j.RS_BLOCK_TABLE[4*(a-1)+1];case d.Q:return j.RS_BLOCK_TABLE[4*(a-1)+2];case d.H:return j.RS_BLOCK_TABLE[4*(a-1)+3];default:return void 0}},k.prototype={get:function(a){var b=Math.floor(a/8);return 1==(1&this.buffer[b]>>>7-a%8)},put:function(a,b){for(var c=0;b>c;c++)this.putBit(1==(1&a>>>b-c-1))},getLengthInBits:function(){return this.length},putBit:function(a){var b=Math.floor(this.length/8);this.buffer.length<=b&&this.buffer.push(0),a&&(this.buffer[b]|=128>>>this.length%8),this.length++}};var l=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],o=function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){function g(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);for(var d in b)b.hasOwnProperty(d)&&c.setAttribute(d,b[d]);return c}var b=this._htOption,c=this._el,d=a.getModuleCount();Math.floor(b.width/d),Math.floor(b.height/d),this.clear();var h=g("svg",{viewBox:"0 0 "+String(d)+" "+String(d),width:"100%",height:"100%",fill:b.colorLight});h.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),c.appendChild(h),h.appendChild(g("rect",{fill:b.colorDark,width:"1",height:"1",id:"template"}));for(var i=0;d>i;i++)for(var j=0;d>j;j++)if(a.isDark(i,j)){var k=g("use",{x:String(i),y:String(j)});k.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),h.appendChild(k)}},a.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},a}(),p="svg"===document.documentElement.tagName.toLowerCase(),q=p?o:m()?function(){function a(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function d(a,b){var c=this;if(c._fFail=b,c._fSuccess=a,null===c._bSupportDataURI){var d=document.createElement("img"),e=function(){c._bSupportDataURI=!1,c._fFail&&_fFail.call(c)},f=function(){c._bSupportDataURI=!0,c._fSuccess&&c._fSuccess.call(c)};return d.onabort=e,d.onerror=e,d.onload=f,d.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",void 0}c._bSupportDataURI===!0&&c._fSuccess?c._fSuccess.call(c):c._bSupportDataURI===!1&&c._fFail&&c._fFail.call(c)}if(this._android&&this._android<=2.1){var b=1/window.devicePixelRatio,c=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(a,d,e,f,g,h,i,j){if("nodeName"in a&&/img/i.test(a.nodeName))for(var l=arguments.length-1;l>=1;l--)arguments[l]=arguments[l]*b;else"undefined"==typeof j&&(arguments[1]*=b,arguments[2]*=b,arguments[3]*=b,arguments[4]*=b);c.apply(this,arguments)}}var e=function(a,b){this._bIsPainted=!1,this._android=n(),this._htOption=b,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=b.width,this._elCanvas.height=b.height,a.appendChild(this._elCanvas),this._el=a,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return e.prototype.draw=function(a){var b=this._elImage,c=this._oContext,d=this._htOption,e=a.getModuleCount(),f=d.width/e,g=d.height/e,h=Math.round(f),i=Math.round(g);b.style.display="none",this.clear();for(var j=0;e>j;j++)for(var k=0;e>k;k++){var l=a.isDark(j,k),m=k*f,n=j*g;c.strokeStyle=l?d.colorDark:d.colorLight,c.lineWidth=1,c.fillStyle=l?d.colorDark:d.colorLight,c.fillRect(m,n,f,g),c.strokeRect(Math.floor(m)+.5,Math.floor(n)+.5,h,i),c.strokeRect(Math.ceil(m)-.5,Math.ceil(n)-.5,h,i)}this._bIsPainted=!0},e.prototype.makeImage=function(){this._bIsPainted&&d.call(this,a)},e.prototype.isPainted=function(){return this._bIsPainted},e.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},e.prototype.round=function(a){return a?Math.floor(1e3*a)/1e3:a},e}():function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){for(var b=this._htOption,c=this._el,d=a.getModuleCount(),e=Math.floor(b.width/d),f=Math.floor(b.height/d),g=[''],h=0;d>h;h++){g.push("");for(var i=0;d>i;i++)g.push(' ');g.push(" ")}g.push("
"),c.innerHTML=g.join("");var j=c.childNodes[0],k=(b.width-j.offsetWidth)/2,l=(b.height-j.offsetHeight)/2;k>0&&l>0&&(j.style.margin=l+"px "+k+"px")},a.prototype.clear=function(){this._el.innerHTML=""},a}();QRCode=function(a,b){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:d.H},"string"==typeof b&&(b={text:b}),b)for(var c in b)this._htOption[c]=b[c];"string"==typeof a&&(a=document.getElementById(a)),this._android=n(),this._el=a,this._oQRCode=null,this._oDrawing=new q(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},QRCode.prototype.makeCode=function(a){this._oQRCode=new b(r(a,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(a),this._oQRCode.make(),this._el.title=a,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=d}();
var TOP_HOST = window.location.host.match(/[a-z0-9]+.(com.cn|net.cn|org.cn|com|net|org|cn)$/)[0];
// var SEARCH_URL = 'http://www.baidu.com/s?q1=\"+this.previousElementSibling.value+\"&q6='+TOP_HOST+'&tn=linghaifa_cpr';
var SEARCH_URL = 'http://www.baidu.com/s?wd=\"+this.previousElementSibling.value+\"&si='+TOP_HOST+'&tn=linghaifa_cpr&ct=2097152';
$(document).ready(function(){
//右侧定高
var rightFix = document.querySelector('.right_fix');
if(rightFix){
var rightFixTop = rightFix.offsetTop;
$(window).bind('scroll', function(){
if($(window).scrollTop() > rightFixTop){
rightFix.className = "right_fix right_fixed";
}else{
rightFix.className = "right_fix";
}
})
}
//正文搜索
var h1Title = document.querySelector("h1.title");
if(h1Title){
var sBoxHtml = "";
$('.rel_art_line').before(sBoxHtml);
}
})
//头部相关推荐跟头部部悬浮html
var h1TitleEle = document.querySelector("h1.title");
var h1Title = "";
if(h1TitleEle){
h1Title = h1TitleEle.textContent;
}
var contentFix = document.querySelector(".content");
if(contentFix){
// var dlRBottomHtml = ''
// +' '
// +'\u6587\u7AE0 \u4EE3\u5199
';
var dlRBottomHtml = ''
+ '
'
+ ' '
+ '
\u6587\u7AE0\u4EE3\u5199\u670D\u52A1 '
+ '
'
+ '
\u8D44\u6DF1\u5199\u624B · \u5E2E\u60A8\u5199\u6587\u7AE0 '
+ '
\u54C1\u8D28\u4FDD\u8BC1\u3001\u539F\u521B\u9AD8\u6548\u3001\u91CF\u8EAB\u5B9A\u5236\u6EE1\u8DB3\u60A8\u7684\u9700\u6C42
'
+ '
\u70B9\u51FB\u4F53\u9A8C
'
var artNum = contentFix.querySelectorAll("h2").length;
var artNumTxt = artNum ? '\uFF08\u5171'+artNum+'\u7BC7\uFF09' : '';//(共'+artNum+'篇)
var sBoxHtml = "";
var sBoxHtmlV2 = ''
/* ai_box
+dlRBottomHtml
*/
+'
'+
'
'+
'';
$('.content').after(sBoxHtmlV2);
var rightTopHtml = '';
$('.right_fix').prepend(rightTopHtml);
//内容头部悬浮二维码
var obj = document.getElementById("qrcode");
new QRCode(obj, window.location.href);
//内容头部悬浮判断
$(function(){
// var dlRBottomHtml = ''
// +' '
// +'\u6587\u7AE0 \u4EE3\u5199
';
var dlRBottomHtml = ''
+ '
'
+ ' '
+ '
\u6587\u7AE0\u4EE3\u5199\u670D\u52A1 '
+ '
'
+ '
\u8D44\u6DF1\u5199\u624B · \u5E2E\u60A8\u5199\u6587\u7AE0 '
+ '
\u54C1\u8D28\u4FDD\u8BC1\u3001\u539F\u521B\u9AD8\u6548\u3001\u91CF\u8EAB\u5B9A\u5236\u6EE1\u8DB3\u60A8\u7684\u9700\u6C42
'
+ '
\u70B9\u51FB\u4F53\u9A8C
'
dlRBottomHtml += "";
/* ai_box
$('#preview_box_fix').append(dlRBottomHtml);
*/
$(window).on('scroll',function(){
let scrollTop = document.documentElement.scrollTop || document.body .scrollTop // 滚动条距离顶部的距离
let windowHeight = document.documentElement.clientHeight || document.body .clientHeight // 可视区的高度
let scrollHeight = document.documentElement.scrollHeight || document.body .scrollHeight //dom元素的高度,包含溢出不可见的内容
if (scrollTop >= 280) {
$('.conttop').addClass('conttop_te');
} else {
$('.conttop').removeClass("conttop_te");
}
//if(scrollHeight - windowHeight - scrollTop <= 100) { //到达底部100px时,加载新内容
if (scrollHeight - windowHeight - scrollTop <= 100) {
$('.conttop').removeClass("conttop_te");
}
})
});
// 头部获取热门推荐
var loadInterval = window.setInterval(function(){
// 头部获取热门推荐
var hottag = $(".rel_art_line").nextAll("p");
if(hottag){
clearInterval(loadInterval);
var html = "";
hottag.each(function(){
var href = $(this).children("a").attr("href");
var title = $(this).children("a").text();
var date = $(this).children("span").text();
html += ""+
""+date+" "+
""+title+" "+
" ";
})
$(".related_bd.ts>ul").html(html);
}
}, 1000);
}