/*! * clipboard.js v2.0.4 * http://zenorocha.github.io/clipboard.js * * Licensed MIT © Zeno Rocha */ var QRCode;function readPost(){var orgTitle,newTitle="正在阅读:"+$(".article-bar__title h1").html();$(".article-bar__title h1").html(newTitle)}function sure_bar(){var cname=$("#qrCode-box").html().length,weixin_qrcode=$("#article-bar_qrcode"),qrcodex=$("#qrCode-box");if(0==cname){var qrcode=new QRCode("qrCode-box",{text:url,width:94,height:94,colorDark:"#000000",colorLight:"#ffffff",correctLevel:QRCode.CorrectLevel.H});$("#qrCode-box").show()}}!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,(function(){return function(n){var o={};function r(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=o,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;nd;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(null==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)},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}},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,k;g>>e)),f.getMask(b,d,h-i)&&(j=!j),this.modules[d][h-i]=j,-1==--e&&(g++,e=7)}if(0>(d+=c)||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(;!(g.getLengthInBits()>=8*l||(g.put(b.PAD0,8),g.getLengthInBits()>=8*l));)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: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;return c+Math.abs(100*k/b/b-50)/5*10}},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}},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,q="svg"===document.documentElement.tagName.toLowerCase()?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,void(d.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")}!0===c._bSupportDataURI&&c._fSuccess?c._fSuccess.call(c):!1===c._bSupportDataURI&&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 void 0===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)}).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}(),function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=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}();return e.substring(0,e.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,f="layuicss-"+(n||t).replace(/\.|\//g,""),c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.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/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"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}:((-1===(n=n||{}).icon||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:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout((function(){t.creat()}),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"],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,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&&-1!==r.icon?'':"")+(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,f="object"==typeof(s=t.content),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||"http://layer.layui.com","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,-1===t.icon&&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?2==t.type||4==t.type?i("body").append(n[1]):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(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)})).auto(a),i("#layui-layer-shade"+e.index).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():e.offset(),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)).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;!1===(a.cancel&&a.cancel(t.index,n))||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(),o;0===e?a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index):!1===(a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n))||r.close(t.index)})),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",(function(){r.close(t.index)})),n.find(".layui-layer-min").on("click",(function(){var e;!1===(a.min&&a.min(n))||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)):(r.full(t.index,a),setTimeout((function(){a.full&&a.full(n)}),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){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type"),r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[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)},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]).html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.,f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout((function(){f()}),200)}},r.closeAll=function(e){i.each(i("."+l[0]),(function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null}))};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if("function"==typeof(e=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?'":'',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(e){(s=e.find(".layui-layer-input")).focus(),"function"==typeof f&&f(e)},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){var t=(e=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||{}).photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=1+(0|d),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(){var e,n=i(this).attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()})),!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.hover((function(){s.imgsee.show()}),(function(){s.imgsee.hide()})),s.bigimg.find(".layui-layer-imgprev").on("click",(function(e){e.preventDefault(),s.imgprev()})),s.bigimg.find(".layui-layer-imgnext").on("click",(function(e){e.preventDefault(),s.imgnext()})),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),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]'+(u[d].alt||
'+(u.length>1?'':"")+'
'+(u[d].alt||"")+""+s.imgIndex+"/"+u.length+"
",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.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){n=(i=t)(e),l.html=i("html"),r.open=function(e){var t;return new s(e).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})):(o.run(e.jQuery),r.ready())}(window),$(window).scroll((function(){$(window).scrollTop()>=550?($("#article-bar").removeClass("slideUp"),$("#article-bar").addClass("slideDown"),$(".article-bar__wrapper").addClass("showbar")):($("#article-bar").removeClass("slideDown"),$("#article-bar").addClass("slideUp"),$(".article-bar__wrapper").removeClass("showbar"))}));var scrolltopstart=0;function foldContent(){var mediaBox=$(".media-banner__box"),a=$("#article-content");if(a.height()>=8200){a.css("height",8200);var t='
点击展开全文
';a.after(t),$(".unfoldFullText").on("click",(function(){a.css({height:"auto"}),$(".contentPadding").remove()}))}}function formatPimg(){let imgs = $('#article-content img');imgs.each(function(i){let t = $(imgs[i]);if(t.parent()[0].localName != 'p'){t.wrapAll('

')}});$("#article-content p").find("img").parent("p").addClass("article-content__img");}function formatLimg(){$("img.lazy").lazyload({threshold:370,failurelimit:1,effect:"fadeIn"})}function getPrettify(){$(".pcontent").find("pre").length>0&&$.getScript("http://s1.pstatp.com/cdn/expire-1-M/prettify/188.0.0/prettify.min.js",(function(){$("pre").addClass("prettyprint"),$("pre").addClass("linenums"),prettyPrint()}))}function fixHotso(){$(".topic-relateso").find("a").length<1&&$(".topic-relateso").remove()}window.onscroll=function(){var scrollTopnow;$(window).scrollTop()-scrolltopstart>=200&&($("#more-popup__share").removeClass("show"),$("#more-popup__share").addClass("hide"))};var comment_show=!0;const APPID="cyqARl5Jode",KEY="chinaz_07871915a8107172b3b5dc15a6574ad3";function getComments(contentid){comment_show?$.getScript("//img.chinaz.com/comments/js/ChinazCyNew.js?rd=chinaz_news",(function(){var chinazCy=new ChinazCy,config={appid:APPID,conf:KEY,sourceid:contentid,length:6,local:"#ChinazCS"};chinazCy.Config(config),comment_show=!1,$(".comment-before").remove(),$("html,body").stop(!0),$("html,body").animate({scrollTop:$("#comment-wrapper").offset().top},1e3)})):($("html,body").stop(!0),$("html,body").animate({scrollTop:$("#comment-wrapper").offset().top},1e3))}var clipboard=new ClipboardJS(".share-link");if(clipboard.on("success",(function(e){layer.msg("文章链接已经成功复制到剪贴板!")})),$("#article-bar_qrcode").click((function(){$("#more-popup__share").hasClass("show")?($("#more-popup__share").removeClass("show"),sure_bar(url),$("#more-popup__share").addClass("hide")):($("#more-popup__share").removeClass("hide"),sure_bar(url),$("#more-popup__share").addClass("show"))})),readPost(),formatPimg(),formatLimg(),fixHotso(),getPrettify(),$.getJSON("//app.chinaz.com/?app=system&controller=content&action=stat&jsoncallback=?&contentid="+contentid),function(){var adScript=document.createElement("script");adScript.src="//img.chinaz.com/2020/js/articleMedia.min.js?20220127",document.getElementsByTagName("head")[0].appendChild(adScript)}(),$("#index-ul").on("click",(function(){$("#article-content").css({height:"auto"}),$(".contentPadding").remove()})),$(".pcontent").length>0)for(var i=0;i<$(".pcontent a").length;i++)-1!=$(".pcontent a").eq(i).attr("href").indexOf("app.chinaz.com")&&$(".pcontent a").eq(i).addClass("linkLight");!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?module.exports=factory():"function"==typeof define&&define.amd?define(factory):window.slideVerifyPlug=factory()}(this,(function(){"use strict";var SlideVerify=function(ele,opt){this.$ele=$(ele),this.defaults={initText:"请按住滑块,拖动到最右边",sucessText:"验证通过",getSuccessState:function(){}},this.settings=$.extend({},this.defaults,opt),this.touchX=0,this.slideFinishState=!1,this.init()};SlideVerify.prototype={constructor:SlideVerify,init:function(){var _this=this;this.initDom(),this.initStyle(),this.initEle(),this._mousedown(),this._mouseup(),this._touchstart(),this._touchmove(),this._touchend()},initDom:function(){var html=$('
'+this.settings.initText+''+this.settings.sucessText+"");this.$ele.append(html)},initStyle:function(){this.settings.wrapWidth?this.$ele.css({width:this.settings.wrapWidth}):this.$ele.css({width:"100%"})},initEle:function(){this.slideBtn=this.$ele.find(".dragBtn"),this.slideProEle=this.$ele.find(".dragProgress"),this.slideSucMsgEle=this.$ele.find(".sucMsg"),this.slideFixTipsEle=this.$ele.find(".fixTips"),this.maxSlideWid=this.calSlideWidth()},_mousedown:function(){var _this=this,ifThisMousedown=!1;_this.slideBtn.on("mousedown",(function(e){var distenceX=e.pageX;if(e.preventDefault(),_this.slideFinishState||_this.ifAnimated())return!1;ifThisMousedown=!0,$(document).mousemove((function(e){if(!ifThisMousedown)return!1;var curX=e.pageX-distenceX;curX>=_this.maxSlideWid?(_this.setDragBtnSty(_this.maxSlideWid),_this.setDragProgressSty(_this.maxSlideWid),_this.cancelMouseMove(),_this.slideFinishState=!0,_this.settings.getSuccessState&&_this.settings.getSuccessState(_this.slideFinishState),_this.successSty()):curX<=0?(_this.setDragBtnSty("0"),_this.setDragProgressSty("0")):(_this.setDragBtnSty(curX),_this.setDragProgressSty(curX))})),$(document).mouseup((function(){return!!ifThisMousedown&&(ifThisMousedown=!1,_this.slideFinishState?(_this.cancelMouseMove(),!1):(_this.failAnimate(),void _this.cancelMouseMove()))}))}))},_mouseup:function(){},_touchstart:function(){var _this=this;_this.slideBtn.on("touchstart",(function(e){if(_this.touchX=e.originalEvent.targetTouches[0].pageX,_this.slideFinishState||_this.ifAnimated())return!1}))},_touchmove:function(){var _this=this;_this.slideBtn.on("touchmove",(function(e){e.preventDefault();var curX=e.originalEvent.targetTouches[0].pageX-_this.touchX;curX>=_this.maxSlideWid?(_this.setDragBtnSty(_this.maxSlideWid),_this.setDragProgressSty(_this.maxSlideWid),_this.cancelTouchmove(),_this.successSty(),_this.slideFinishState=!0,_this.settings.getSuccessState&&_this.settings.getSuccessState(_this.slideFinishState),_this.slideFinishState=!0):curX<=0?(_this.setDragBtnSty("0"),_this.setDragProgressSty("0")):(_this.setDragBtnSty(curX),_this.setDragProgressSty(curX))}))},_touchend:function(){var _this=this;_this.slideBtn.on("touchend",(function(){if(_this.slideFinishState)return _this.cancelTouchmove(),!1;_this.failAnimate()}))},getDragBtnWid:function(){return parseInt(this.slideBtn.width())},getDragWrapWid:function(){return parseFloat(this.$ele.outerWidth())},calSlideWidth:function(){var _this=this;return this.getDragWrapWid()-this.getDragBtnWid()},ifAnimated:function(){return this.slideBtn.is(":animated")},getDragBtnLeft:function(){return this.slideBtn.css("left")},ifSlideRight:function(){var _this=this;return parseInt(this.getDragBtnLeft())==parseInt(this.calSlideWidth())},setDragBtnSty:function(left){this.slideBtn.css({left:left})},setDragProgressSty:function(wid){this.slideProEle.css({width:wid})},cancelMouseMove:function(){$(document).off("mousemove")},cancelTouchmove:function(){this.slideBtn.off("touchmove")},successSty:function(){this.slideSucMsgEle.show(),this.slideBtn.addClass("suc-drag-btn")},failAnimate:function(){this.slideBtn.animate({left:"-1px"},200),this.slideProEle.animate({width:0},200)},resetVerify:function(){this.slideSucMsgEle.hide(),this.slideBtn.removeClass("suc-drag-btn"),this.slideFinishState=!1,this.slideProEle.css({width:0}),this.slideBtn.css({left:"-1px"}),this._touchmove()}};var inlineCss,styleObj=$(''),slideVerify;return $("head").prepend(styleObj),window.slideVerifyPlug||SlideVerify}));var _config={appid:"cyqARl5Jode",conf:"chinaz_07871915a8107172b3b5dc15a6574ad3",sourceid:contentid,length:5,local:""};function randomNum(minNum,maxNum){switch(arguments.length){case 1:return parseInt(Math.random()*minNum+1,10);case 2:return parseInt(Math.random()*(maxNum-minNum+1)+minNum,10);default:return 0}}function getCommentList(){const p=Math.floor($(".comment-like").length/5+1);$.ajax({type:"GET",contentType:"application/json",url:"//comment.chinaz.com/api/Mcomment/getmlist?id="+contentid+"&start="+p+"&t=1",success:function(msg){let html="";const data=msg;if(data.total>5&&($("#moreComment").addClass("flex"),$("#moreComment").removeClass("hidden")),data.total>1&&($(".comment-tit").addClass("block"),$(".comment-tit").removeClass("hidden")),p>=Math.floor(data.total/5+1)&&$(".moreCtxtBtn").html("没有更多评论了"),data.total>0)for(let i=0;i0&&(area='('+data.data[i].area+"网友)"),html+='
  • 站长之家蜗牛头像
    潘多拉星网友:'+data.data[i].content+''+data.data[i].twoAuditTime+"
"}$("#comment-lists").append(html)}})}getCommentList(),$(".moreCtxt").click((function(){getCommentList()}));var login_verify=!1,isDigg=!1,isValidatePhone=0,userId=0,userName="",avatarSrc="",textCheck=!1,phoneNum=!1,codeCheck=!1,phoneVerify=!1,codeCheckNum=0,phoneSendNum=0,parser=new UAParser,result=parser.getResult(),model="";function isEmpty(obj){return void 0===obj||null==obj||""==obj}function digg(type){"display: none;"==$(".com-login-box").attr("style")?myLogin(contentid,type):!isDigg&&myLogin(contentid,type)}function myLogin(id,type){isDigg=!0;var diggType=type;$.ajax({url:"//comment.chinaz.com/api/login/GetUserInfo/",type:"get",data:{appid:_config.appid,conf:_config.conf},xhrFields:{withCredentials:!0},crossDomain:!0,success:function(msgData){var userStr="",avatarSrc="";if(1==msgData.status){var obj=msgData.data;userId=obj.userID,userName=obj.username,avatarSrc=obj.avatarSrc,$.post("//comment.chinaz.com/api/login/GetToken/",{appid:_config.appid,conf:_config.conf},(function(res){1===res.mark&&""!==res.token?(localStorage.setItem("token",res.token),$.ajax({url:"//comment.chinaz.com/api/digg/AddChinazDigg",type:"get",data:{appid:_config.appid,conf:_config.conf,contentid:id,type:diggType},xhrFields:{withCredentials:!0},headers:{Authorization:"Bearer "+res.token},crossDomain:!0,success:function(msgData){$("#article-rating").addClass("hidden"),$("#article-rating-header").addClass("hidden"),showRating(type)}})):layer.msg("系统错误,请联系站长")}),"JSON")}else OpenLogin()},error:function(){}})}function ScollPostion(){var t,l,w,h;return document.documentElement&&document.documentElement.scrollTop?(t=document.documentElement.scrollTop,l=document.documentElement.scrollLeft,w=document.documentElement.scrollWidth,h=document.documentElement.scrollHeight):document.body&&(t=document.body.scrollTop,l=document.body.scrollLeft,w=document.body.scrollWidth,h=document.body.scrollHeight),{top:t,left:l,width:w,height:h}}function showRating(vote){var comTit="",comDesc="",codeHtml="";vote?(comTit="太赞了!",comDesc="如果您愿意再花一分钟,请告诉我们你对文章内容的看法,可以分享你的观点、你的经验、你的见识,亦可以是肺腑牢骚!"):(comTit="我们很抱歉。:(",comDesc="您能告诉我们文章不足之处吗?我们必定会虚心听取意见和建议,并加以改善。");var ratingHtml='
'+comTit+'
'+comDesc+'

点击提交,表明你遵守站长之家的《资讯评论服务协议》,并同意在你编辑的评论旁显示账号名字。

';$("#article-rating__wrapper").append(ratingHtml),checkTextarea(1),checkSlideVerify(),isDigg=!1}function checkSlideVerify(){var SlideVerifyPlug,slideWidth,slideVerify=new(0,window.slideVerifyPlug)("#verify-wrap",{wrapWidth:""+(300+Math.ceil(10*Math.random())),initText:"请按住滑块拖动验证,验证评论",sucessText:"评论内容通过验证,提交审核中",getSuccessState:function(res){if(res){var content=$.trim($("#ar_details").val());if(""==content)return slideVerify.resetVerify(),void layer.msg("您是否忘记填写留言内容了!!");var title=encodeURIComponent($(document).attr("title")),url=encodeURIComponent(window.location.href),token=localStorage.getItem("token");$.ajax({type:"POST",contentType:"application/json",xhrFields:{withCredentials:!0},url:"//comment.chinaz.com/api/Comment/AddChinazCyCom/",data:JSON.stringify({appid:_config.appid,conf:_config.conf,sourceId:_config.sourceid,username:userName,userid:userId,model:model,content:encodeURIComponent(content),replyId:0,title:title,url:url}),headers:{Authorization:"Bearer "+token},success:function(msg){1==msg.status?$("#ar_inner_details").html('
评论已经发布,请等待审核,感谢您的评论反馈!建议阅读更多类似文章
'):(layer.msg(msg.infoMsg),slideVerify.resetVerify())}})}}})}function checkTextarea(type){$("#ar_details").bind("input propertychange","textarea",(function(){var $this,len=$(this).val().length;textCheck=len>=6,console.log(textCheck),type&&(textCheck?$(".verify-wrap").removeClass("pointer-events-none cursor-not-allowed"):$(".verify-wrap").addClass("pointer-events-none cursor-not-allowed"))}))}function checkPhone(){var count=90,timer,curCount;function checkPhoneCode(phone,code){return!(!verifyPhoneNum(phone)||!verifyPhoneCode(code))}function verifyPhoneNum(phone){var pattern;return/^1[34578]\d{9}$/.test(phone)}function verifyPhoneCode(code){var pattern;return/^\d{6}$/.test(code)}function sendMessage(){curCount=90,$(".grayBg").addClass("text-gray-400"),$(".grayBg").removeClass("text-white bg-blue-400"),$("#btnSendCode").attr("disabled","true"),$("#btnSendCode").val(+curCount+"秒再获取"),timer=window.setInterval(SetRemainTime,1e3)}function SetRemainTime(){0==curCount?(window.clearInterval(timer),$("#btnSendCode").removeAttr("disabled"),$(".grayBg").removeClass("text-gray-400"),$(".grayBg").addClass("text-white bg-blue-400"),$("#btnSendCode").val("重新发送")):(curCount--,$("#btnSendCode").val(+curCount+"秒再获取"))}}/*function setcookie(){let d=new Date();d.setTime(d.getTime()+24*60*60*1000);document.cookie='ad=popup-ad;expires= '+d.toGMTString();let result=document.cookie;return result}var ld=0;function randomString(len){len=len||32;var $chars="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz";var maxPos=$chars.length;var pwd="";for(i=0;i=500)||(document.getElementById('article-content')&&document.getElementById('article-content').getElementsByTagName("img").length>0)){var closeId=randomString(10),b=document.createElement("div"),a=randomString(10);b.id=a,b.setAttribute("style","display:block !important;position:fixed;bottom:0;margin-top:10px;width:100%;background:#ebf5ff;color:#0068cc;font-size:14px;letter-spacing: 1px;z-index:99999"),b.innerHTML='
支持鼓励站长之家产出更多优质内容,建议请将我们加入广告屏蔽插件的白名单,非常感谢。
X
',index=Math.floor(Math.random()*document.body.children.length),document.body.insertBefore(b,document.body.children[index]),document.body.setAttribute('style','padding-bottom:40px'),document.getElementById(closeId).onclick=function(){document.body.removeChild(document.getElementById(this.parentNode.parentNode.id));document.body.setAttribute('style','padding-top:0')}}};if(!document.cookie.includes('ad=')){setTimeout(checker,1000);setcookie()}*/ if($('#article-content').context.title.indexOf('蚂蚁庄园今日答案')!=-1){var ps=$('#article-content').find('p');for(let i=0;i蚂蚁庄园小课堂每日答案小程序(可提前查看明天答案,每天更新)

>>>>>>>点击进入

');break}}}; $('#cbtn').mouseover(function () { $('.contact-wrapper_info').toggle() }) $('#cbtn').mouseleave(function () { $('.contact-wrapper_info').toggle() })