var webhost = "https://www.guanlixi.com";//跨域的时候需要
var zt='',paytps='付费后可复制、下载全文';
if($(".ztpage").length > 0){//专题
    zt=1;
    paytps='付费后可下载全文';
    webhost=webhost+$(".ztpage").attr("path");
}
//jquery.cookie
(function (factory) {
	if (typeof define === 'function' && define.amd) {
		// AMD
		define(['jquery'], factory);
	} else if (typeof exports === 'object') {
		// CommonJS
		factory(require('jquery'));
	} else {
		// Browser globals
		factory(jQuery);
	}
}(function ($) {

	var pluses = /\+/g;

	function encode(s) {
		return config.raw ? s : encodeURIComponent(s);
	}

	function decode(s) {
        s = s.replace("%", '');
		return config.raw ? s : decodeURIComponent(s);
	}

	function stringifyCookieValue(value) {
		return encode(config.json ? JSON.stringify(value) : String(value));
	}

	function parseCookieValue(s) {
		if (s.indexOf('"') === 0) {
			// This is a quoted cookie as according to RFC2068, unescape...
			s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
		}

		try {
			// Replace server-side written pluses with spaces.
			// If we can't decode the cookie, ignore it, it's unusable.
			// If we can't parse the cookie, ignore it, it's unusable.
			s = decodeURIComponent(s.replace(pluses, ' '));
			return config.json ? JSON.parse(s) : s;
		} catch(e) {}
	}

	function read(s, converter) {
		var value = config.raw ? s : parseCookieValue(s);
		return $.isFunction(converter) ? converter(value) : value;
	}

	var config = $.cookie = function (key, value, options) {

		// Write

		if (value !== undefined && !$.isFunction(value)) {
			options = $.extend({}, config.defaults, options);

			if (typeof options.expires === 'number') {
				var days = options.expires, t = options.expires = new Date();
				t.setTime(+t + days * 864e+5);
			}

			return (document.cookie = [
				encode(key), '=', stringifyCookieValue(value),
				options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
				options.path    ? '; path=' + options.path : '',
				options.domain  ? '; domain=' + options.domain : '',
				options.secure  ? '; secure' : ''
			].join(''));
		}

		// Read

		var result = key ? undefined : {};

		// To prevent the for loop in the first place assign an empty array
		// in case there are no cookies at all. Also prevents odd result when
		// calling $.cookie().
		var cookies = document.cookie ? document.cookie.split('; ') : [];

		for (var i = 0, l = cookies.length; i < l; i++) {
			var parts = cookies[i].split('=');
			var name = decode(parts.shift());
			var cookie = parts.join('=');

			if (key && key === name) {
				// If second argument (value) is a function it's a converter...
				result = read(cookie, value);
				break;
			}

			// Prevent storing a cookie that we couldn't decode.
			if (!key && (cookie = read(cookie)) !== undefined) {
				result[name] = cookie;
			}
		}

		return result;
	};

	config.defaults = {};

	$.removeCookie = function (key, options) {
		if ($.cookie(key) === undefined) {
			return false;
		}

		// Must not alter options, thus extending a fresh object...
		$.cookie(key, '', $.extend({}, options, { expires: -1 }));
		return !$.cookie(key);
	};

}));


var payed=0;
function gopay(data){
    let wordmoney = data.money;
    if(isModile()){//手机端
        var paytype ='weixinh5';
    } else {
        
        var paytype ='weixin';
    }
    
    var htmlplay='<div class="pupop" id="downwordpay"><div class="copy_pay_tit">付费下载</div><div class="bd pays clearfix"><p class="tps">'+paytps+'</p><div class="red-pay"><p> 限制特价 <em class="wordmoney">'+wordmoney+'</em>元/篇</p><div class="copy_buy"><a href="javascript:;" class="onpay">在线支付</a></div></div></div><div class="bd paye clearfix"><div class="red-pay-hd clearfix"><a class="on" href="javascript:;" data-id="weixin">使用微信支付</a><a href="javascript:;" class="alipay" data-id="alipay">支付宝支付</a></div><div class="pay_qrcode"></div><ul class="red-pay-box"><li class="wxpay on"><p>扫一扫微信支付<br />微信支付:<em class="wordmoney">'+wordmoney+'</em>元/篇</p></li><li class="alipay"><p>扫一扫支付宝支付<br />支付宝支付:<em class="wordmoney">'+wordmoney+'</em>元/篇</p></li></ul></div><div class="desc"><a href="javascript:;" class="copy_server">常见问题 - 联系客服</a></div><div class="downword"><a href="javascript:;">立即下载Word文档</a></div><a href="javascript:;" class="close" data-id="3" target="_self">X</a></div>';
    $("body").append(htmlplay);
    pupop('downwordpay');
    
}

$(document).on("click",".copy_buy .onpay",function(e){
        timeout = false; //启动及关闭按钮
        if(isModile()){//手机端
            var paytype ='weixinh5';
        } else {
            $(".pays").hide();
            $(".paye").show();
            var paytype ='weixin';
        }
        setQrcodepay(paytype);
       var $wbRedPaperPayBtn = $(".red-pay-hd a").each(function(i, e) {
                   $(e).click(function() {
                       timeout = true;
                       var type = $(this).attr("data-id");
                       setQrcodepay(type);
                       timeout = false;
                       $($wbRedPaperPayBtn.removeClass("on")[i]).addClass("on");
                       $($(".red-pay-box li").removeClass("on")[i]).addClass("on");
                   });
        });
        
    });

function checkpay(t){
    var id = lskpa.infoid,classid = lskpa.classid,copy=t.attr("copy"),type=isModile();
    $.ajax({type : "get",async:false,url :webhost + "/e/extend/downword/",data:{"enews":"check","id":id,"classid":classid,"type":type},dataType : "jsonp",jsonp: "jsonpcallback",success : function(res){
    	if (res.status==1) {
            $.cookie('copy'+id+'_'+classid,'1',{path:'/'});
            if(copy==1){
                $(".button_download.word_download").click();
            } else{
                if(zt){//专题下载
                    downtime(t,res.url);
                   //zturl=res.url;
                }else{
                    window.location.href=res.url;
                }
                //$('<iframe style="display:none;"/>').appendTo('html').attr('src',res.url);
            }
            return false;
    	} else if(res.status ==2){
            $("#downwordpay").remove();
            $(".mask").hide();
            alertBox({type:"mini",msg:res.message});
        } else{
            if(res.ddno != 0){
                $(".mask").attr("ddno",res.ddno);
            }
            gopay(res);
           
        }
    },error:function(){  
        
    }  
    });
}
function downtime(t,url){
   $(".down").after('<div class="tips">由于文件比较多，十几秒后即可下载完成</div>');
     if($(".tips").length > 0){
    
    $.ajax({type : "get",url :url,dataType : "jsonp",jsonp: "jsonpcallback",success : function(res){
         	if (res.status==1) {
            window.location.href=res.url;
            $('.tips').remove();
    	}
    },error:function(){

    }
    });
     }
}
if(typeof(ClipboardJS)=="function"){
    var clipboard = new ClipboardJS('.copyall');
    clipboard.on('success', function(e) {
        if(iscopyid()){
            alertBox({type:"mini",msg:"复制成功"});
        }
        e.clearSelection();
    });
    clipboard.on('error', function(e) {
        alertBox({type:"mini",msg:"复制失败，浏览器被禁用复制。请联系站点"});
        e.clearSelection();
    });
}
function iscopyid(){
    var id = lskpa.infoid,classid = lskpa.classid;
    if($.cookie('copy'+id+'_'+classid) ) {
        return true;
    }
    return false;
}
$(function () {
if($(".article-content").length > 0){
   var ua = navigator.userAgent;
   if(isModile() && ua.indexOf('baiduboxapp') > 0){
        $(".down-tips p").hide();
        $(".down-tips .baiduie").show();
   }
    if(iscopyid()){
        $("#f-bottom").show();
        $(".box.one").addClass("fixed2");
        $(".box.mtips").addClass("mtips2");
    }
    
}

$(document).on("click",".button_download.word_download",function(e){
    var t = $(this);
    $(".button_download.word_download").click();
    $(".button_download.word_download").click();
    checkpay(t);
});
//预览页下载
$(document).on("click",".down-art-title .word_download,.f_download",function(e){
    var t = $(this);
    checkpay(t);
});


$(document).on("click",".pupop .close",function(e){
		var $id=$(this).attr("data-id");
		if($id){
			if($id==2){//复制关闭支付
				$("li.wxpay .qrcode,li.alipay .qrcode").attr("src", "");
			}
            if($id==3){//下载word
            	$("li.wxpay .qrcode,li.alipay .qrcode").attr("src", "");
                $(".mask").fadeOut(100);
                //$(".mask").remove()
                timeout=true;
            }
            if($id==1){
                $(".mask2").remove()
            }
			$(this).parent(".pupop").remove()
		}else{
			$(".mask").fadeOut(100);
           // $(".mask").remove()
		}
		$(this).parent(".pupop").fadeOut(100);
		
});

var downhelphtml='<div class="pupop" id="copy_help"><h2>常见问题</h2><div class="bd"><ul><li><h3>1.支付成功后，怎么下载？</h3><p>亲，您好！付款成功后，无需验证码，直接下载哦！</p></li><li><h3>2.支付成功后，为何无法下载内容？</h3><p>亲，请尝试刷新一下网页（按键盘F5键），再进行下载。</p></li><li>  <h3>3.付费后能否更换浏览器、更换电脑进行下载？</h3><p>亲，更换浏览器或电脑会导致下载不成功哦！请确保付费时的浏览器及电脑和下载文章时所用的浏览器是一样的。</p></li><li><h3>4.如何联系客服？</h3>  <p>麻烦您添加客服QQ：<a href="http://wpa.qq.com/msgrd?v=3&uin=1693673727&site=qq&menu=yes">1693673727</a> ，留言“付款后无法下载文章”，并发送相关付款截图，客服将为您处理。客服在线时间为周一至周六：9:00-12:00 14:00-18:00</p></li></ul></div><a href="javascript:;" class="close" data-id="1" target="_self">X</a></div><div class="mask mask2"></div>';
$(document).on("click",".copy_server",function(e){
    	$("body").append(downhelphtml);
    	pupop('copy_help');
});

//长按开始
 var _time = null;
            window.ontouchstart = function() {
                clearRange();
                clearTimeout(_time);
                _time = setTimeout(function() {
                   console.info("long press");
                    clearRange();
                    $(this).downinfo();
                }, 400)
            };
            window.ontouchmove = function() {
                clearTimeout(_time)
            };
            window.ontouchend = function() {
                clearTimeout(_time)
            };

    var downurl = webhost + '/down/?classid='+lskpa.classid+'&id='+lskpa.infoid;
    $(".download_card_btn_lb,.download_card").wrapInner('<a href="'+downurl+'" target="_blank"></a>');
    $(".afbox .button_download").eq(0).attr("href",downurl).attr("target","_blank");
    $(".afbox .button_download").eq(1).attr("href",downurl).attr("target","_blank");
    $(".copy-fullpage").attr("href",downurl).attr("target","_blank");
    
    //$(".afbox .button_download").eq(1).addClass("word_download").attr("copy",1);
    //长按结束
    document.body.oncopy=function(){
	   if(!iscopyid()){
           if($("#downwordpay").length == 0 ){
               var t = $('.word_download');
               checkpay(t);
             //  window.location.href=downurl;
           }
	       return false;
	   }
    };
_time = null,
window.ontouchstart = function() {
    _time = setTimeout(function() {
        console.log(iscopyid());
     if(!iscopyid()){
         if($("#downwordpay").length == 0 ){
             var t = $('.word_download');
             checkpay(t);
             //window.location.href=downurl;
         }
         return false;
     }
    }, 400)
}, window.ontouchmove = function() {
    clearTimeout(_time);
}, window.ontouchend = function() {
   clearTimeout(_time);
}
    $(document).on('click','.hcontent',function (e) {
        clearRange();
	});
	if(isModile()){
	    var element=$(document);
            if (typeof(element.onselectstart) != "undefined") {        
            // IE下禁止元素被选取        
            element.onselectstart = new Function("return false");        
        } else {
            // firefox下禁止元素被选取的变通办法        
            element.onmousedown = new Function("return false");        
            element.onmouseup = new Function("return true");        
        } 
	}
    let navurl = window.location.href;
    if(navurl.indexOf("/down/") != -1){
        //预览页加载
        var isyl=1;
        var lefttop='';
    } else if( zt == 1){ //专题
        var lefttop='';
        var isyl=2;
    } else {
        var isyl=0,title = $("h1.title").text(),
        lefttop ='<div class="fixed_item"><a class="fixed_download" href="'+downurl+'" target="_blank"><em></em>点击下载本文文档</a></div><div class="fixed_top"><div><b>'+ title +'</b><div class="fixed_top_search"><form action="/e/search/index.php" method="post" name="searchform" id="searchform"><input class="search_text_top" type="text" name="keyboard" value="" placeholder="请输入关键词" ><input type="submit" value="搜索一下" class="search_btn"/><input type="hidden" name="show" value="title" /><input type="hidden" name="tempid" value="1" /><input type="hidden" name="tbname" value="news" /></form></div><p><a href="'+downurl+'" class="copy-fullpage" copy="1">复制全文</a><a href="'+downurl+'" target="_blank" class="dl-link"><em></em>下载本文档</a></p></div></div>';
    }
	$("body").append(lefttop + '<div class="mask"></div>');
    //<div class="mask"></div><div class="fixed_top"><div><b>'+ title +'</b><p><a href="javascript:;" class="copy-fullpage">复制全文</a><a href="'+downurl+'" target="_blank" class="dl-link">下载本文档</a></p></div></div>
    if($(".box.one").length > 0){
        var boxone = $(".box.one"),yltop = boxone.offset().top
    }
    $(window).scroll(function(){
        let $scroll=$(window).scrollTop();
        if(isyl ==0 ){
           let ele =isModile()?$(".hcontent"):$(".wrapper");
           etop = ele.offset().top;
           if ($scroll>etop) {
            $(".fixed_top").addClass("in");
           }else{
            $(".fixed_top").removeClass("in");
           }
           if(isModile()){
               var winHeight = ele.height()+100;
               if ($scroll >= winHeight ) {
                   $(".fixed_top").removeClass("in");
                }
           }
       }
       if(isyl == 1){//预览页
           // console.log($scroll,yltop)
            if ($scroll>yltop) {
                boxone.addClass("fixed");
            }else{
                boxone.removeClass("fixed");
            }

       }
    });
    
});

function clearRange(){
    
}

function setQrcodepay (type) {
    var ddno = $(".mask").attr("ddno");
    let id = lskpa.infoid,classid = lskpa.classid;
    $.ajax({type : "get",async:false,url : webhost + "/e/extend/downword/",data:{"enews":"pay","ddno":ddno,"type":type,"id":id,"classid":classid},dataType : "jsonp",jsonp: "jsonpcallback",success : function(res){
        if (res.status==1) {
            if(isModile()){
                $(".copy_buy").html('<a href="'+res.gorul+'" class="gowx" target="_blank">在线支付</a>');
               // $(".copy_buy .onpay").attr("href",res.gorul);
                window.open(res.gorul, "_blank");
               // $('.gowx').click();
            } else {
                $(".pay_qrcode").html('<img src="'+res.payurl+'" />');
            }
            $(".mask").attr("ddno",res.ddno);
             ddno = res.ddno;
        }
        }
    });
        times();
        function times(){
            if(timeout) return;
            queryorderword(ddno);
            setTimeout(times,1500); //time是指本身,延时递归调用自己,100为间隔调用时间,单位毫秒
        }
}

function pupop(id){
	$("#" + id + ",.mask").fadeIn(100);
}

function queryorderword(ddno){
    $.ajax({type : "get",async:false,url : webhost + "/e/extend/downword/",data:{"enews":"payorder","ddno":ddno},dataType : "jsonp",jsonp: "jsonpcallback",success : function(res){
        if (res.status==1) {
			timeout = true;
            var id = lskpa.infoid,classid = lskpa.classid;
            $.cookie(zt+'copy'+id+'_'+classid,'1',{path:'/'});
            $("#downwordpay .red-pay-hd,#downwordpay .red-pay-box,#downwordpay .desc,.pay_qrcode,.red-pay").hide();
            $("#downwordpay .downword,#f-bottom").show();
            if(zt==1){
                $("#downwordpay .downword").append('<div class="tips" style="display:block;">由于文件比较多，十几秒后即可下载完成</div>');
                $.ajax({type : "get",url :res.url,dataType : "jsonp",jsonp: "jsonpcallback",success : function(data){
                     	if (data.status==1) {
                        window.location.href=data.url;
                        $('.tips').remove();
                        $("#downwordpay .downword a").attr("href",data.url);
                	}
                },error:function(){
                
                }
                });
                return false;
            }
            if(res.url){
                window.location.href=res.url;
                $("#downwordpay .downword a").attr("href",res.url);
               // console.log(111);
                //$('<iframe style="display:none;"/>').appendTo('html').attr('src',res.url);
            }
        }
        }
    });
}

function isModile(){
    if ($(window).width() <= 768) {
    	return true;
    }
    return false;
}


(function(a,b,c){if(typeof module!=="undefined"&&module.exports){module.exports=b(a,c)}else{if(typeof define==="function"&&define.amd){define(b(a,c))}else{a.AlertBox=b.call(a,a,c)}}})(this,function(b,g){var e=0;var a="onorientationchange" in b?"orientationchange":"resize";var f=null;function c(d){if(!(this instanceof c)){return new c(d).init()}this.opts=d||{};this.uuid=e;this.type=this.opts.type||"doubleBtn";this.alertType=this.opts.alertType||"";this.alertCls=this.opts.alertCls||"";this.title=this.opts.title||"";this.msg=this.opts.msg||"";this.cancelText=this.opts.cancelText||"取消";this.confirmText=this.opts.confirmText||"确定";this.cancel=this.opts.cancel||"";this.confirm=this.opts.confirm||"";this.callback=this.opts.callback||"";this.delay=this.opts.delay||2000}c.prototype={constructor:c,getEl:function(h,d){return h.querySelector(d)},init:function(){var d=this;e++;d.setStyle();d.addAlertBox();d.type=="mini"?d.minEvent():d.alertEvent();d.onresize();return d},addAlertBox:function(){var d=this,h=d.getPos();d.alertType=="fixed"?d.getFixedMask():d.getMask();d.alertType=="fixed"?d.getEl(g,"#alertMask_"+d.uuid).insertAdjacentHTML("beforeend",d.getHtml()):d.getEl(g,"body").insertAdjacentHTML("beforeend",d.getHtml());d.alertBox=d.getEl(g,"#alertBox_"+d.uuid);if(d.alertType=="fixed"){d.alertBox.style.cssText="width:auto;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);position:absolute;left:50%;top:50%;"}else{d.alertBox.style.cssText="width:"+parseInt(h.width-(2*25))+"px;left:25px;top:"+parseInt(h.sTop+b.innerHeight/2-d.alertBox.offsetHeight/2)+"px;"}d.callback&&typeof d.callback=="function"&&d.type!="mini"&&d.callback()},setStyle:function(){var h=this,i=g.createElement("style"),d=".alert-box{position:absolute;left:0;top:0;border-radius:0.2rem;background:#FFF;-webkit-box-sizing:border-box;z-index:100;font-size:1rem;}.alert-msg{padding:0.4rem 0.6rem 0.6rem;text-align:center;line-height:1.8;word-break:break-all;}.alert-title{padding:0.6rem 0.6rem 0;text-align:center;}.alert-btn{display:-webkit-flex !important;display:-webkit-box;border-top:1px solid #DCDCDC;}.alert-btn a{display:block;-webkit-flex:1 !important;-webkit-box-flex:1;height:1.68rem;line-height:1.68rem;text-align:center;}.alert-btn a.alert-confirm{border-left:1px solid #DCDCDC;color:#EDA200;}.alert-btn a.alert-confirm.single{border-left:none;}.alert-mini-box{border-radius:0.2rem;background:rgba(0,0,0,.7);color:#fff;}";i.type="text/css";i.innerText=d;h.getEl(g,"head").appendChild(i)},getPos:function(){var j=g.documentElement.offsetWidth||g.body.offsetWidth,i=g.documentElement.offsetHeight||g.body.offsetHeight,d=g.documentElement.scrollTop||g.body.scrollTop;if(b.innerHeight>i){i=b.innerHeight}return{width:j,height:i,sTop:d}},getHtml:function(){var d=this,h="";if(d.type!="mini"){h+='<div class="alert-box '+d.alertCls+'" id="alertBox_'+d.uuid+'"><div class="alert-title">'+d.title+'</div><div class="alert-msg">'+d.msg+'</div><div class="alert-btn">';switch(d.type){case"doubleBtn":h+='<a href="javascript:;" class="alert-cancel mr10">'+d.cancelText+'</a><a href="javascript:;" class="alert-confirm">'+d.confirmText+"</a>";break;case"onceCancel":h+='<a href="javascript:;" class="alert-cancel">'+d.cancelText+"</a>";break;case"onceConfirm":h+='<a href="javascript:;" class="alert-confirm single">'+d.confirmText+"</a>";break}h+="</div></div>"}else{h+='<div class="alert-box alert-mini-box '+d.alertCls+'"  id="alertBox_'+d.uuid+'"><div class="alert-msg">'+d.msg+"</div></div>"}return h},getMask:function(){var h=this,i=h.getPos(),d=g.createElement("div");d.id="alertMask_"+h.uuid;h.getEl(g,"body").appendChild(d);d.style.cssText="position:absolute;left:0;top:0;width:"+i.width+"px;height:"+i.height+"px;background:rgba(0,0,0,0.3);z-index:99";h.type=="mini"&&(d.style.backgroundColor="rgba(255, 255, 255, 0)")},getFixedMask:function(){var h=this,d=g.createElement("div");d.id="alertMask_"+h.uuid;h.getEl(g,"body").appendChild(d);d.style.cssText="position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.3);z-index:99;"},minEvent:function(){var d=this;setTimeout(function(){d.remove(d.getEl(g,"#alertMask_"+d.uuid));d.callback&&typeof d.callback=="function"&&d.callback()},d.delay)},alertEvent:function(){var h=this;if(h.alertBox){var i=h.getEl(h.alertBox,".alert-cancel"),d=h.getEl(h.alertBox,".alert-confirm");i&&h.reset(i,h.cancel);d&&h.reset(d,h.confirm)}},reset:function(i,h){var d=this;i.onclick=function(){var j=h&&typeof h=="function"&&h(this);if(j===false){return}d.alertType!="fixed"&&d.remove(d.alertBox);d.remove(d.getEl(g,"#alertMask_"+d.uuid));b.removeEventListener(a,f,false);f=null}},remove:function(d){this.getEl(g,"body").removeChild(d)},destroy:function(){this.remove(this.alertBox);this.remove(this.getEl(g,"#alertMask_"+this.uuid))},onresize:function(){var d=this;f=function(){d.resizeEvent(d)};b.addEventListener(a,f,false)},resizeEvent:function(i){var h=g.getElementById("alertMask_"+i.uuid),d=g.getElementById("alertBox_"+i.uuid),j;if(d&&h){clearTimeout(j);j=setTimeout(function(){var k=i.getPos();h.style.height=k.height+"px";h.style.width=k.width+"px";d.style.width=parseInt(k.width-(2*25))+"px";d.style.top=parseInt(k.sTop+b.innerHeight/2-i.alertBox.offsetHeight/2)+"px"},150)}}};return c},document);


function alertBox(a) {
	var b = {
		type: "mini",
		msg: "报错示范",
		alertType: "fixed"
	};
	$.extend(b, a);
	AlertBox(b)
}
//noUse()
function noUse() {
	setInterval(function() {
		check()
	}, 1000);
	var check = function() {
		function doCheck(a) {
			if (("" + a / a)["length"] !== 1 || a % 20 === 0) {
				(function() {}
					["constructor"]("debugger")())
			} else {
				(function() {}
					["constructor"]("debugger")())
			}
			doCheck(++a)
		}
		try {
			doCheck(0)
		} catch (err) {}
	};
	check();
}

/*


//禁止右键
$(document).bind("contextmenu", function () { return false; });

//屏蔽f12, ctrl
$(document).bind("keydown ", function (e) {
    if (e.keyCode === 123 || e.keyCode === 17) { //屏蔽F12 ctrl
        e.preventDefault();
        return false;
    }
    return true;
});


var preventCtrl = function (e) {

    if (e.keyCode === 123) { //屏蔽F12 
        e.preventDefault();
        return false;
    } else if (e.keyCode === 17) { //ctrl
        console.log("prevent keycode s");
        document.onkeydown = preventS;
        return false;
    }
    return true;
}

var preventS = function (e) {
    if (e.keyCode === 123 || e.keyCode === 83) { //屏蔽F12 ctrl
        e.preventDefault();
        return false;
    }
    return true;
}

var nopreventS = function (e) {
    if (e.keyCode === 17) {
        console.log("no prevent keycode s");
        document.onkeydown = preventCtrl;
    }

}
*/