您的位置:首页 > 其它

jq安全评分检测

2016-02-25 17:57 218 查看
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>跑分检验</title>

<style type="text/css">

body{margin:0px;padding:0px;}

ul, ol{list-style:none;}

clearfix:after{content:'\20';display:block;height:0;clear:both;visibility:hidden;overflow:hidden}

.clearfix{zoom:1}

.mod-ucenter-cright{width:690px;margin:40px auto;}

#mod-account-score{line-height:52px;position:relative;}

.ucenter-cright-title{font-size:22px;color:#404040;font-family:\5fae\8f6f\96c5\9ed1,\9ed1\4f53;font-weight:normal;line-height:40px;padding-top:20px;}

.score-step, .score-state-left, .score-state-right, .score-btn, .mod-account-avatar{background:url('ucenter_1.png') no-repeat 0 0;}

.score-step{background-position:0 -138px;width:435px;height:10px;margin:14px 0 0 0;display:inline;}

.score-state-left{float:left;width:5px;height:10px;}

.score-level-2 .score-state-left{background-position:0 -180px;}

.score-state-right{float:left;height:10px;}

.score-level-2 .score-state-right{background-position:right -180px;}

.left{float:left;}

.score-num{font-size:28px;font-family:\5fae\8f6f\96c5\9ed1,\9ed1\4f53;margin-left:10px;line-height:34px;}

.score-level-2 .score-step-tip, .score-level-2 .score-num{color:#f4a830;}

.score-btn{background-position:0 -99px;width:111px;height:38px;line-height:38px;float:right;cursor:pointer;color:#fff;font-size:20px;font-family:\5fae\8f6f\96c5\9ed1,\9ed1\4f53;text-align:center;text-shadow:0 0 2px #f57a16;}

.score-tip, .warn-title{clear:both;font-size:14px;font-weight:normal;height:24px;line-height:24px;color:#333;padding:10px 0 10px 0;}

.score-tip b{font-weight:bold;color:#f4422a;}

.score-detail{padding-bottom:20px;border-bottom:1px dashed #dfdfdf;}

.score-detail .score-error-list{height:30px;color:#666;padding-left:24px;font-size:12px;margin-bottom:10px;background:url(error.png) left no-repeat;margin-right:180px;clear:both;}

.score-detail .score-warn-list{height:30px;color:#666;padding-left:24px;font-size:12px;margin-bottom:10px;background:url(warning.png) left no-repeat;margin-right:180px;clear:both;}

.score-detail .score-good-list{height:30px;color:#666;padding-left:24px;font-size:12px;margin-bottom:10px;background:url(good.png) left no-repeat;margin-right:180px;clear:both;}

.score-detail .score-error-list span{float:left;display:block;margin-top:6px;}

.score-detail .score-warn-list span{float:left;display:block;margin-top:6px;}

.score-detail .score-good-list span{float:left;display:block;margin-top:6px;}

.score-detail .score-error-list a{text-align:center;line-height:30px;color:#333;display:block;width:77px;height:30px;background:url('ucenter_1.png') no-repeat -103px 0;float:right;}

.score-detail .score-warn-list a{text-align:center;line-height:30px;color:#333;display:block;width:77px;height:30px;background:url('ucenter_1.png') no-repeat -103px 0;float:right;}

.score-detail .score-good-list a{text-align:center;line-height:30px;color:#333;display:block;width:77px;height:30px;background:url('ucenter_1.png') no-repeat -103px 0;float:right;}

</style>

<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>

<script type="text/javascript">

var current = 0;

$(document).ready(function(){
$(".score-state-right").attr("style","width:0px");
$("#check-secure").html("开始检测");
$("#check-secure").click(function(){
if($("#scorenum").html()!=""){
var current= 0;
}
var scoreline=0;
var score=0;
var line=430;
var auth = $(".safe-auth-done").length;
var mobile = $(".safe-mobile-done").length;
var google = $(".safe-google-done").length;
var tradePwd = $(".safe-tradePwd-done").length;
var pwdscore = 20; 
var scoredetail='';
if(auth>0){
score=score+20;
scoredetail+='<li class="score-good-list clearfix"><span>您已完成实名认证</span></li>';
}else{
scoredetail+='<li class="score-error-list clearfix"><span>恭喜您,您还没有实名认证!</span><a href="#" data-click="app">查看信息</a></li>';
}
if(mobile>0){
score=score+20;
scoredetail+='<li class="score-good-list clearfix"><span>您已完成绑定手机</span></li>';
}else{
scoredetail+='<li class="score-error-list clearfix"><span>绑定密保手机,帐号安全一步到位</span><a href="#" data-click="app">立即绑定</a></li>';
}
if(google>0){
score=score+20;
scoredetail+='<li class="score-good-list clearfix"><span>您已绑定谷歌身份验证器</span></li>';
}else{
scoredetail+='<li class="score-error-list clearfix"><span>您还没有绑定谷歌身份验证器</span><a href="#" data-click="app">绑定谷歌</a></li>';
}
if(tradePwd>0){
score=score+20;
}else{
scoredetail+='<li class="score-error-list clearfix"><span>您还没有设置交易密码</span><a href="#" data-click="app">设置密码</a></li>';
}
if(pwdscore>=0){
if(pwdscore==10){
score=score+10;
scoredetail+='<li class="score-warn-list clearfix"><span>您的交易密码安全度一般,建议修改为大小写字母+数字+特殊符号的形式。</span><a href="#" data-click="app">修改密码</a></li>';
}else if(pwdscore==20){
score=score+20;
scoredetail+='<li class="score-good-list clearfix"><span>恭喜您,您的交易密码安全度很高,可以不用修改。</span><a href="#" data-click="app">修改密码</a></li>';
}else if(pwdscore==0){
scoredetail+='<li class="score-warn-list clearfix"><span>您的交易密码安全度一般,建议修改为大小写字母+数字+特殊符号的形式。</span><a href="#" data-click="app">修改密码</a></li>';
}
}
$("#score_detail").html(scoredetail);
scoreline=line*(score/100);
var speedline=score*50;
var snum = setInterval("increment()",50);
$(".score-state-right").animate({width:scoreline+"px"},speedline,function(){
$(".score-detail").show();
window.clearInterval(snum);
});
$("#check-secure").html("重新检测");
});

});

function increment(){
current++;
$("#scorenum").html(current); 

}

</script>

<div class="mod-ucenter-cright">
<div id="mod-account-score" class="clearfix score-level-2 ">
<p class="ucenter-cright-title score-title">安全评分</p>
<div class="score-step left">
<div class="score-state-left"></div>
<div class="score-state-right" style="width:343px"></div>
</div>
<div class="score-num left" ><span id="scorenum"></span>分!</div>
<div class="score-btn" id="check-secure">重新检测</div>
<div class="score-tip">您的帐号存在安全风险,建议立即优化以下<b>2</b>项:</div>
</div>
<div class="score-detail" style="display:none;">
<ul class="score-detail-ul animate-enter clearfix" id="score_detail">

</ul>
</div>

</div>

</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: