function fixedSidebarInButton(){function t(){var t=$(".csdn-side-toolbar");if(0===t.length)var e=setInterval(function(){t=$(".csdn-side-toolbar"),t.length>0&&(t.css("left",i()+"px"),clearInterval(e))},200);else t.css("left",i()+"px")}function i(){return $("#rightAside").length&&"block"===$("#rightAside").css("display")?$("#rightAside").offset().left+300+8:$("main").offset().left+$("main").width()+8}window.csdn.fixedSidebar({targetBox:$(".blog_container_aside"),mainBox:$("main"),sidebar:$(".blog_container_aside"),direction:"left",position:"fixed",bottom:0,zIndex:99,sidebarRightMargin:8,sidebarLeftMargin:8}),t(),$(window).resize(function(){t()})}function showInit(){$("
").appendTo("body").css({width:"100%",height:"100%",background:"rgba(0,0,0,.4)",position:"fixed",left:"0",top:"0",display:"none","z-index":"1"}),$("").appendTo("body").css({width:"100%",position:"fixed",left:"0",top:"34%","text-align":"center",display:"none","z-index":"2"}),$("").appendTo("#st_confirmBox").css({width:"80%",margin:"0 auto",background:"#fff","border-radius":"3px",overflow:"hidden","padding-top":"20px","text-align":"center"}),$("").appendTo("#st_confirm").css({background:"#fff",overflow:"hidden","padding-top":"20px","text-align":"center",display:"block",padding:"15px 8px 30px"}),$("").appendTo("#st_confirm").css({background:"#fff",color:"#8d8d8d",padding:"8px","text-align":"center",display:"block",width:"50%",margin:"0 auto","float":"left","box-sizing":"border-box","border-top":"1px solid #cfcfcf",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}),$("").appendTo("#st_confirm").css({background:"#1b79f8",color:"#fff",padding:"8px","text-align":"center",display:"block",width:"50%",margin:"0 auto","float":"left","box-sizing":"border-box","border-top":"1px solid #1b79f8",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}),$("").appendTo("#st_confirm").css({clear:"both",display:"block"}),$("").appendTo("body").css({width:"100%",position:"fixed",left:"0",top:"34%","text-align":"center",display:"none","z-index":"2"}),$("").appendTo("#st_alertBox").css({width:"80%",margin:"0 auto",background:"#fff","border-radius":"2px",overflow:"hidden","padding-top":"20px","text-align":"center"}),$("").appendTo("#st_alert").css({background:"#fff",overflow:"hidden","padding-top":"20px","text-align":"center",display:"block",padding:"15px 8px 30px"}),$("").appendTo("#st_alert").css({background:"#1b79f8",color:"#fff",padding:"8px","text-align":"center",display:"block",width:"72%",margin:"0 auto","margin-bottom":"20px","border-radius":"2px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}),$("").appendTo("body").css({width:"100%",position:"fixed",left:"0",bottom:"10%","text-align":"center",display:"none"}),$("").appendTo("#st_toastBox").css({color:"#fff",background:"rgba(0,0,0,.8)",padding:"8px 24px","border-radius":"4px","max-width":"80%",display:"inline-block","font-size":"16px"})}function showToast(t){if(!t.text)return!1;clearTimeout(st_timer),$("#st_toastBox").hide();var i=t.text,e=parseInt(t.time?t.time:2300),s=t.speed?t.speed:"normal",n=t.bottom?t.bottom:"10%";if(t.zindex){var a=parseInt(t.zindex);$("#st_mask").css({"z-index":a-1}),$("#st_toastBox").css({"z-index":a})}else $("#st_mask").css({"z-index":1}),$("#st_toastBox").css({"z-index":2});$("#st_toastBox").css({bottom:n}),$("#st_toastContent").text(i),$("#st_mask").fadeIn(s,function(){$("#st_toastBox").fadeIn(s)}),st_timer=setTimeout(function(){$("#st_toastBox").fadeOut(function(){$("#st_mask").fadeOut()})},e)}function showAlert(t){if(!t.text)return!1;var i=t.text,e=t.bgColor?t.bgColor:"#1b79f8",s=t.color?t.color:"#fff",n=t.btnText?t.btnText:"确定",a=t.top?t.top:"34%";if(t.zindex){var o=parseInt(t.zindex);$("#st_mask").css({"z-index":o-1}),$("#st_alertBox").css({"z-index":o})}else $("#st_mask").css({"z-index":1}),$("#st_alertBox").css({"z-index":2});$("#st_alert_text").text(i),$("#st_alert_btn").css({background:e}),$("#st_alert_btn").css({color:s}),$("#st_alert_btn").text(n),$("#st_alertBox").css({top:a}),$("#st_mask,#st_alertBox").show(),t.success&&$("#st_alert_btn").off("click").on("click",function(){t.success()})}function showConfirm(t){if(!t.text)return!1;var i=t.text,e=t.rightText?t.rightText:"确定",s=t.rightBgColor?t.rightBgColor:"#1b79f8",n=t.rightColor?t.rightColor:"#fff",a=t.leftText?t.leftText:"取消",o=t.top?t.top:"34%";if(t.zindex){var r=parseInt(t.zindex);$("#st_mask").css({"z-index":r-1}),$("#st_confirmBox").css({"z-index":r})}else $("#st_mask").css({"z-index":1}),$("#st_confirmBox").css({"z-index":2});$("#st_confirm_text").text(i),$(".st_confirm_btn.cancel").text(a),$(".st_confirm_btn.success").text(e),$(".st_confirm_btn.success").css({background:s,color:n,"border-top":"1px solid "+s}),$("#st_confirmBox").css({top:o}),$("#st_mask,#st_confirmBox").show(),t.cancel?$(".st_confirm_btn.cancel").off("click").on("click",function(){closeMask(),t.cancel()}):$(".st_confirm_btn.cancel").off("click").on("click",function(){closeMask()}),t.success?$(".st_confirm_btn.success").off("click").on("click",function(){closeMask(),t.success()}):$(".st_confirm_btn.success").off("click").on("click",function(){closeMask()})}function closeMask(){$("#st_mask,#st_alertBox,#st_confirmBox").hide()}function getCookie(t){for(var i=document.cookie.split("; "),e=0;e').appendTo("body"),i=0;i<5;i++)$('').appendTo(t)},window.CSDNAnimation=t}),$(function(){function t(){return window.devicePixelRatio>1}function i(t,i){$("span.blog-expert-button-follow").each(function(e){t?$(this).attr("data-name")==i&&$(this).html('已关注取消').removeClass("btn-red-follow").addClass("btn-gray-follow attented"):$(this).attr("data-name")==i&&$(this).html("关注").addClass("btn-red-follow").removeClass("btn-gray-follow attented")}),i==$("p.csdn-tracking-statistics").attr("username")&&(t?($("#btnAttent").addClass("attented").text("已关注").removeClass("btn-red-hollow").addClass("btn-gray-hollow"),e(1)):($("#btnAttent").text("关注").addClass("btn-red-hollow").removeClass("btn-gray-hollow attented"),e(-1)))}function e(t){$("#fan").text().indexOf("+")<0?$("#fan").text(parseInt($("#fan").text())+t):$("#fanBox").attr("title",parseInt($("#fanBox").attr("title"))+t)}!function(){$(".medal-img").on("click",function(){window.csdn=window.csdn?window.csdn:{},window.csdn.userMedal.show({username:username,nickname:nickName,avatar:avatar})})}();var s=$("#search-blog-words"),n=$(".btn-search-blog");s.on("focus",function(){n.addClass("btn-search-blog-active"),n.find("img").attr("src","https://csdnimg.cn/cdn/content-toolbar/csdn-white-search.png?v=1587006908"),s.attr("placeholder","")}),s.on("blur",s,function(t){n.removeClass("btn-search-blog-active"),"Black"==skinStatus?n.find("img").attr("src","https://csdnimg.cn/cdn/content-toolbar/csdn-white-search.png?v=1587006908"):n.find("img").attr("src","https://csdnimg.cn/cdn/content-toolbar/csdn-sou.png?v=1587021042"),s.attr("placeholder","搜博主文章")}),s.keyup(function(t){var i=t.keyCode;if(13==i){var e=encodeURIComponent(s.val());if(e){var n="//so.csdn.net/so/search/s.do?q="+e+"&t=blog&u="+username;window.open(n)}}}),n.on("click",function(t){var i=encodeURIComponent(s.val());if(i){var e="//so.csdn.net/so/search/s.do?q="+i+"&t=blog&u="+username;window.open(e)}t.preventDefault()}),function(){if(t()){var i=$(".user-years");i.length>0&&(i=i.attr("src").split("/")[$(".user-years").attr("src").split("/").length-1],$(".user-years").attr("src","https://g.csdnimg.cn/static/user-reg-year/2x/"+i))}}(),window.csdn=window.csdn?window.csdn:{},window.csdn.watchBtnChange=i}),(isCorporate||"undefined"==typeof articleId||$(window).width()>0)&&$(document).ready(fixedSidebarInButton),window.leftFixedSide?window.leftFixedSide:window.leftFixedSide={},window.leftFixedSide.fixedSidebarInButton=fixedSidebarInButton,$(function(){function t(){var t=document.cookie.match(new RegExp("(^| )UserName=([^;]*)(;|$)"));return t?t[2]:""}function i(t){if($("#fan").text().indexOf("万")===-1&&$("#fan").text().indexOf("+")===-1){var i=parseInt($("#fan").text())+parseInt(t),e=i>0?i:0;$("#fan").text(e),$("#fanBox").attr("title",e)}var s=$(".fans_read_more");s.length>0&&s.trigger("click")}function e(t,i){var e=t.hasClass("attented");e?n(t,i):s(t,i)}function s(t,e){var s="https://me.csdn.net/api/relation/create?source=blog";$.ajax({type:"POST",url:s,contentType:"application/json; charset=utf-8",data:JSON.stringify({username:username}),xhrFields:{withCredentials:!0},success:function(s){s="object"!=typeof s?JSON.parse(s):s,200===s.code&&(t.addClass("attented").text("已关注"),i(1),e&&window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({mod:"popu_379",spm:"1001.2101.3001.4123",extend1:"关注"}))},error:function(t){t="object"!=typeof t.responseText?JSON.parse(t.responseText):t.responseText,400102==t.code&&window.csdn.loginBox.show()}})}function n(t,e){var s="https://me.csdn.net/api/relation/destroy?source=blog";$.ajax({type:"POST",url:s,contentType:"application/json; charset=utf-8",data:JSON.stringify({username:username}),xhrFields:{withCredentials:!0},success:function(s){200==s.code?(t.text("关注").removeClass("attented"),i(-1),e&&window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({mod:"popu_379",spm:"1001.2101.3001.4123",extend1:"已关注"})):console.error(s.msg)}})}var a=new window.CSDNAnimation;a.animationInit(),$(".personal-watch").click(function(t){var i=!1;i=!!t.originalEvent,e($(".personal-watch"),i)}),t()}),function(){function t(t){var i=document.createElement("div");void 0!=i.textContent?i.textContent=t:i.innerText=t;var e=i.innerHTML;return i=null,e}function i(t){var i="";return 0==t.length?"":(i=t.replace(//g,">"))}window.csdn?window.csdn:window.csdn={},window.csdn.htmlEncode_inner=t,window.csdn.htmlEncode_Escape=i}(),!function(t,i){"function"==typeof define&&define.amd?define(["jquery"],i):"object"==typeof exports?module.exports=i():t.Query=i(window.Zepto||window.jQuery||$)}(this,function(t){return{getQuery:function(t,e,s){new RegExp("(^|&|#)"+t+"=([^&]*)(&|$|#)","i"),s=s||window;var n,a,o=s.location.href,r="";if(n="#"==e?o.split("#"):o.split("?"),""!=(a=1==n.length?"":n[1])){gg=a.split(/&|#/);var c=gg.length;for(str=arguments[0]+"=",i=0;i0){e=e.substr(1);for(var s=e.split("&"),n=0,a=s.length;n0&&(i[o[0]]=decodeURI(o[1])||"")}}return i}}}),function(t,i){"function"==typeof define&&define.amd?define(["jquery","query"],i):"object"==typeof exports?module.exports=i():t.Paging=i(window.Zepto||window.jQuery||$,Query)}(this,function(t,i){function e(){var t=Math.random().toString().replace(".","");this.id="Paging_"+t}return t.fn.Paging=function(i){var s=[];return t(this).each(function(){var n=t.extend({target:t(this)},i),a=new e;a.init(n),s.push(a)}),s},e.prototype={init:function(i){this.settings=t.extend({callback:null,pagesize:10,current:1,prevTpl:"<",nextTpl:">",firstTpl:"首页",lastTpl:"末页",ellipseTpl:"...",toolbar:!1,hash:!1,pageSizeList:[5,10,15,20]},i),this.target=t(this.settings.target),this.container=t(''),this.target.append(this.container),this.render(this.settings),this.format(),this.bindEvent()},render:function(t){void 0!==t.count?this.count=t.count:this.count=this.settings.count,void 0!==t.pagesize?this.pagesize=t.pagesize:this.pagesize=this.settings.pagesize,void 0!==t.current?this.current=t.current:this.current=this.settings.current,this.pagecount=Math.ceil(this.count/this.pagesize),this.format()},bindEvent:function(){var i=this;this.container.on("click","li.js-page-action,li.ui-pager",function(e){return!t(this).hasClass("ui-pager-disabled")&&!t(this).hasClass("focus")&&(t(this).hasClass("js-page-action")?(t(this).hasClass("js-page-first")&&(i.current=1),t(this).hasClass("js-page-prev")&&(i.current=Math.max(1,i.current-1)),t(this).hasClass("js-page-next")&&(i.current=Math.min(i.pagecount,i.current+1)),t(this).hasClass("js-page-last")&&(i.current=i.pagecount)):t(this).data("page")&&(i.current=parseInt(t(this).data("page"))),void i.go())})},go:function(t){var e=this;this.current=t||this.current,this.current=Math.max(1,e.current),this.current=Math.min(this.current,e.pagecount),this.format(),this.settings.hash&&i.setHash({page:this.current}),this.settings.callback&&this.settings.callback(this.current,this.pagesize,this.pagecount)},changePagesize:function(t){this.render({pagesize:t}),this.settings.changePagesize&&this.settings.changePagesize.call(this,this.pagesize,this.current,this.pagecount)},format:function(){var i="";if(i+='",i+='",this.pagecount>6){if(i+='',this.current<=2)i+='',i+='',i+='- '+this.settings.ellipseTpl+"
";else if(this.current>2&&this.current<=this.pagecount-2)this.current>3&&(i+="- "+this.settings.ellipseTpl+"
"),i+='",i+='",i+='",this.current'+this.settings.ellipseTpl+"");else{i+='- '+this.settings.ellipseTpl+"
";for(var e=this.pagecount-2;e
",this.container.html(i),1==this.current&&(t(".js-page-prev",this.container).addClass("ui-pager-disabled"),t(".js-page-first",this.container).addClass("ui-pager-disabled")),this.current==this.pagecount&&(t(".js-page-next",this.container).addClass("ui-pager-disabled"),t(".js-page-last",this.container).addClass("ui-pager-disabled")),this.container.find('li[data-page="'+this.current+'"]').addClass("focus").siblings().removeClass("focus"),this.settings.toolbar&&this.bindToolbar()},bindToolbar:function(){for(var i=this,e=t('跳转'),s=t(".ui-select-pagesize",e),n="",a=0,o=this.settings.pageSizeList.length;a'+this.settings.pageSizeList[a]+"条/页";s.html(n),s.val(this.pagesize),t("input",e).val(this.current),t("input",e).click(function(){t(this).select()}).keydown(function(e){if(13==e.keyCode){var s=parseInt(t(this).val())||1;i.go(s)}}),t("a",e).click(function(){var e=parseInt(t(this).prev().val())||1;i.go(e)}),s.change(function(){i.changePagesize(t(this).val())}),this.container.children("ul").append(e)}},e}),function(t,i){function e(t,e,s,n){i.post(t,e,s,n)}window.csdn?window.csdn:window.csdn={},window.csdn.post=e}(window,jQuery),$(function(){function t(t,i){var e=qrcode(6,"M");e.addData(i),e.make(),t.html(e.createImgTag(3,3)),t.html(t.html())}var i=$("#btShareColumn"),e=$("#ShareColumnCode"),s=$(".share-column-box");i.on("click",function(){var i=$(this).data("url");t(e,i),s.show()}),$(document).click(function(t){i.is(t.target)||0!==i.has(t.target).length||s.hide()})});var st_timer=null;$(function(){showInit()}),$(function(){function t(t,i,e){$.ajax({url:t,type:"POST",data:i,xhrFields:{withCredentials:!0},success:function(t){if(s.skinBoxshadow.html(""),200==t.code){var i='';s.skinBoxshadow.append(i),s.skinBoxshadow.fadeIn(200),setTimeout(function(){s.skinBoxshadow.fadeOut(200),s.skinTipbox.slideUp(200),""!==e&&(window.location.href=e.window_url)},1e3)}else if(400200002==t.code){var n=' 你还不是VIP会员
本皮肤为VIP用户可用哦,请您开通VIP会员后再试!
开通VIP会员 ';s.skinBoxshadow.append(n),s.skinBoxshadow.fadeIn(200),$(".skin-bt-close").on("click",function(){s.skinBoxshadow.fadeOut(200)})}else if(400200003==t.code){var a=' '+t.message+'
开通VIP会员,即可专享所有皮肤哦~!
开通VIP会员 ';s.skinBoxshadow.append(a),s.skinBoxshadow.fadeIn(200),$(".skin-bt-close").on("click",function(){s.skinBoxshadow.fadeOut(200)})}else{var o='";s.skinBoxshadow.append(o),s.skinBoxshadow.fadeIn(200),setTimeout(function(){s.skinBoxshadow.fadeOut(200)},1e3)}},error:function(t){s.skinBoxshadow.html("");var i='';s.skinBoxshadow.append(i),s.skinBoxshadow.fadeIn(200),setTimeout(function(){s.skinBoxshadow.fadeOut(200)},1e3)}})}function i(){var t,i,e=window.location.href;return e.indexOf("?assign_skin_id")!=-1?(i=e.split("?")[0],t=e.split("?")[1].split("=")[1]):i=e,t=parseInt(t),{window_url:i,skin_id:t}}function e(){function t(){c={img_title:s.userSkin.find("#uploadHeaderimg").attr("value"),img_back:s.userSkin.find("#uploadBgimg").attr("value"),img_column:s.userSkin.find("#uploadColumnimg").attr("value"),color_title:s.userSkin.find("#topicColor").val(),color_title_hover:s.userSkin.find("#topicHoverColor").val(),color_sub_title:s.userSkin.find("#subTopicColor").val()};var t="^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$",i=new RegExp(t);return""===c.img_title?(a("头图必传",!1),!1):!(""!==c.color_title&&!i.test(c.color_title))||(a("请填写正确的颜色值",!1),!1)}function e(){s.userSkin.find("input").val(""),$("#uploadHeaderimg").value="",$("#uploadBgimg").value="",$("#uploadColumnimg").value="",s.userSkin.find(".upload-icon").show(),s.userSkin.find(".success-upload-icon").hide(),s.userSkin.find(".tip-massage").html("点击选择上传的图片"),s.userSkin.fadeOut(200)}function n(t,i,e){var n=blogUrl+"phoenix/web/v1/"+t;$.ajax({url:n,type:"POST",data:i,xhrFields:{withCredentials:!0},success:function(i){setTimeout(function(){if(200==i.code)"preview-skin"===t?!!e&&e(!0,i.data?i.data:"操作成功"):!!e&&e(!0,i.message?i.message:"操作成功");else{var n=' 你还不是VIP会员
本功能为VIP用户可用哦,请您开通VIP会员后再试!
开通VIP会员 ';s.skinBoxshadow.append(n),s.skinBoxshadow.fadeIn(200),$(".skin-bt-close").on("click",function(){s.skinBoxshadow.fadeOut(200),s.skinBoxshadow.html("")})}},2e3)},error:function(t){a("系统错误,请重新上传",!1)}})}function a(t,i){s.skinBoxshadow.html("");var e="";e=i?'":'",s.skinBoxshadow.append(e),s.skinBoxshadow.fadeIn(200),setTimeout(function(){s.skinBoxshadow.fadeOut(200)},1e3)}function o(t){var i=null;return void 0!=window.createObjectURL?i=window.createObjectURL(t):void 0!=window.URL?i=window.URL.createObjectURL(t):void 0!=window.webkitURL&&(i=window.webkitURL.createObjectURL(t)),i}function r(t){s.cropBox.find("#cropImg").cropper({aspectRatio:t,viewMode:2,dragMode:"crop",preview:".small",responsive:!0,restore:!1,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:1,movable:!0,scalable:!1,zoomable:!0,rotatable:!1,preview:document.querySelectorAll(".final-img")})}$(".customize").click(function(){s.userSkin.fadeIn(200)});var c={img_title:"",img_back:"",img_column:"",color_title:"",color_title_hover:"",color_sub_title:""};s.userSkin.find(".bt-back").click(function(){e()}),s.userSkin.find(".user-skin-refer").click(function(){window.csdn.userLogin.loadAjax(function(){if(t()){var e=function(t,e){t&&(a(e,!0),setTimeout(function(){i();window.location.href=blog_address},200))};n("save-custom-skin",c,e)}})}),s.userSkin.find(".user-skin-preview").click(function(){if(t()){var i=function(t,i){t&&window.open(i)};n("preview-skin",c,i)}});var l;s.uploadSkinImg.change(function(t){var i=$(this)[0].files[0],e=i.type,n=i.size/1024;if(!/.(jpg|jpeg|png)$/.test(e))return a("请上传jpg、png格式图片",!1),!1;var c=o(i);switch(s.cropBox.find(".crop-img-before img").attr("src",c),l=$(this)[0].id,s.cropBox.find("#cropImg").cropper("destroy"),l){case"uploadHeaderimg":if(r(19.2),2048