|
|
@ -158,42 +158,42 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<script type="text/javascript" src="/static/js/jquery-1.10.2.min.js?v={{config.version}}"></script> |
|
|
|
<script type="text/javascript" src="/static/js/jquery-1.10.2.min.js?v={{config.version}}"></script> |
|
|
|
<script src="/static/language/zh-cn.js?v={{config.version}}"></script> |
|
|
|
<script src="/static/language/zh-cn.js?v={{config.version}}"></script> |
|
|
|
<script src="/static/language//lan.js?v={{config.version}}"></script> |
|
|
|
<script src="/static/language/Simplified_Chinese/lan.js?v={{config.version}}"></script> |
|
|
|
<script type="text/javascript" src="/static/layer/layer.js?v={{config.version}}"></script> |
|
|
|
<script type="text/javascript" src="/static/layer/layer.js?v={{config.version}}"></script> |
|
|
|
<script type="text/javascript" src="/static/js/jquery.qrcode.min.js?v={{config.version}}"></script> |
|
|
|
<script type="text/javascript" src="/static/js/jquery.qrcode.min.js?v={{config.version}}"></script> |
|
|
|
<script type="text/javascript" src="/static/js/Validform_v5.3.2_min.js?v={{config.version}}"></script> |
|
|
|
<script type="text/javascript" src="/static/js/Validform_v5.3.2_min.js?v={{config.version}}"></script> |
|
|
|
<script type="text/javascript"> |
|
|
|
<script type="text/javascript"> |
|
|
|
function Wreset(){ |
|
|
|
function Wreset(){ |
|
|
|
var w = $$(window).width(); |
|
|
|
var w = $(window).width(); |
|
|
|
var yzmw = $$(".login .line").width() - 140; |
|
|
|
var yzmw = $(".login .line").width() - 140; |
|
|
|
if($$(".yzm").is(":visible") && w > 640){ |
|
|
|
if($(".yzm").is(":visible") && w > 640){ |
|
|
|
$$(".login").css({"height":"365px","margin-top":"-230px"}); |
|
|
|
$(".login").css({"height":"365px","margin-top":"-230px"}); |
|
|
|
} |
|
|
|
} |
|
|
|
else{ |
|
|
|
else{ |
|
|
|
$$(".login").removeAttr("style") |
|
|
|
$(".login").removeAttr("style") |
|
|
|
} |
|
|
|
} |
|
|
|
$$(".login .yzm .inputtxt").width(yzmw); |
|
|
|
$(".login .yzm .inputtxt").width(yzmw); |
|
|
|
} |
|
|
|
} |
|
|
|
$$(function(){ |
|
|
|
$(function(){ |
|
|
|
Wreset(); |
|
|
|
Wreset(); |
|
|
|
var setTime = ''; |
|
|
|
var setTime = ''; |
|
|
|
$$.get('/public?name=app&fun=login_qrcode', function(res){ |
|
|
|
$.get('/public?name=app&fun=login_qrcode', function(res){ |
|
|
|
if (res.status){ |
|
|
|
if (res.status){ |
|
|
|
$$('#qrcode').qrcode({ |
|
|
|
$('#qrcode').qrcode({ |
|
|
|
render: "canvas", //也可以替换为table |
|
|
|
render: "canvas", //也可以替换为table$ |
|
|
|
width: 150, |
|
|
|
width: 150, |
|
|
|
height: 150, |
|
|
|
height: 150, |
|
|
|
text: res.msg |
|
|
|
text: res.msg$ |
|
|
|
}); |
|
|
|
}); |
|
|
|
$$('.entrance').show(); |
|
|
|
$('.entrance').show(); |
|
|
|
} |
|
|
|
} |
|
|
|
}).error(function(res,textStatus,errorThrown) { |
|
|
|
}).error(function(res,textStatus,errorThrown) { |
|
|
|
if (res.status == 404){ |
|
|
|
if (res.status == 404){ |
|
|
|
$$('.entrance').hide(); |
|
|
|
$('.entrance').hide(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
function controlTime(){ |
|
|
|
function controlTime(){ |
|
|
|
$$.get('/public?name=app&fun=is_scan_ok',function(res) { |
|
|
|
$.get('/public?name=app&fun=is_scan_ok',function(res) { |
|
|
|
if(res.status){ |
|
|
|
if(res.status){ |
|
|
|
layer.msg('扫码成功,请稍后...',{icon:1}); |
|
|
|
layer.msg('扫码成功,请稍后...',{icon:1}); |
|
|
|
clearInterval(setTime); |
|
|
|
clearInterval(setTime); |
|
|
@ -202,7 +202,7 @@ |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
function loginAdmin(key){ |
|
|
|
function loginAdmin(key){ |
|
|
|
$$.get('/public?name=app&fun=set_login',{secret_key:key},function(res) { |
|
|
|
$.get('/public?name=app&fun=set_login',{secret_key:key},function(res) { |
|
|
|
layer.msg(res.msg,{icon:res.status?1:2}) |
|
|
|
layer.msg(res.msg,{icon:res.status?1:2}) |
|
|
|
if (res.status){ |
|
|
|
if (res.status){ |
|
|
|
layer.msg('正在安全登录中,请稍后...',{time:0,shade: [0.4,'#fff'],icon:16}); |
|
|
|
layer.msg('正在安全登录中,请稍后...',{time:0,shade: [0.4,'#fff'],icon:16}); |
|
|
@ -212,16 +212,16 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
$$('.bg_img').click(function(event) { |
|
|
|
$('.bg_img').click(function(event) { |
|
|
|
if ($$(this).hasClass('pc')){ |
|
|
|
if ($(this).hasClass('pc')){ |
|
|
|
$$(this).removeClass('pc'); |
|
|
|
$(this).removeClass('pc'); |
|
|
|
$$('.scanCode').hide().prev().show(); |
|
|
|
$('.scanCode').hide().prev().show(); |
|
|
|
clearInterval(setTime); |
|
|
|
clearInterval(setTime); |
|
|
|
$$('.tips>span>span').html('扫码登录更安全'); |
|
|
|
$('.tips>span>span').html('扫码登录更安全'); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
$$(this).addClass('pc'); |
|
|
|
$(this).addClass('pc'); |
|
|
|
$$('.account').hide().next().show(); |
|
|
|
$('.account').hide().next().show(); |
|
|
|
$$('.tips>span>span').html('点击账号登录') |
|
|
|
$('.tips>span>span').html('点击账号登录') |
|
|
|
setTime = window.setInterval(controlTime,2000); |
|
|
|
setTime = window.setInterval(controlTime,2000); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -231,8 +231,8 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
<script type="text/javascript"> |
|
|
|
<script type="text/javascript"> |
|
|
|
$$(function(){ |
|
|
|
$(function(){ |
|
|
|
$$(".loginform").Validform({ |
|
|
|
$(".loginform").Validform({ |
|
|
|
tiptype:function(msg,o,cssctl){ |
|
|
|
tiptype:function(msg,o,cssctl){ |
|
|
|
if(!o.obj.is("form")){ |
|
|
|
if(!o.obj.is("form")){ |
|
|
|
var objtip=o.obj.siblings(".Validform_checktip"); |
|
|
|
var objtip=o.obj.siblings(".Validform_checktip"); |
|
|
@ -243,7 +243,7 @@ |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$$('#login-button').click(function(){ |
|
|
|
$('#login-button').click(function(){ |
|
|
|
var username = encodeURIComponent($$("input[name='username']").val()); |
|
|
|
var username = encodeURIComponent($$("input[name='username']").val()); |
|
|
|
var password = encodeURIComponent($$("input[name='password']").val()); |
|
|
|
var password = encodeURIComponent($$("input[name='password']").val()); |
|
|
|
var code = $$("input[name='code']").val(); |
|
|
|
var code = $$("input[name='code']").val(); |
|
|
@ -254,20 +254,20 @@ |
|
|
|
|
|
|
|
|
|
|
|
var data = 'username='+username+'&password='+password+'&code='+code; |
|
|
|
var data = 'username='+username+'&password='+password+'&code='+code; |
|
|
|
var loadT = layer.msg("$tData['lan']['JS2']",{icon:16,time:0,shade: [0.3, '#000']}); |
|
|
|
var loadT = layer.msg("$tData['lan']['JS2']",{icon:16,time:0,shade: [0.3, '#000']}); |
|
|
|
$$.post('/login',data,function(rdata){ |
|
|
|
$.post('/login',data,function(rdata){ |
|
|
|
layer.close(loadT); |
|
|
|
layer.close(loadT); |
|
|
|
if(!rdata.status){ |
|
|
|
if(!rdata.status){ |
|
|
|
if(username == 'admin' && rdata.msg.indexOf('用户名') != -1) rdata.msg += ', <br>获取默认用户和密码命令: bt default'; |
|
|
|
if(username == 'admin' && rdata.msg.indexOf('用户名') != -1) rdata.msg += ', <br>获取默认用户和密码命令: bt default'; |
|
|
|
$$("#errorStr").html(rdata.msg); |
|
|
|
$("#errorStr").html(rdata.msg); |
|
|
|
$$("input[name='password']").val(''); |
|
|
|
$("input[name='password']").val(''); |
|
|
|
num = rdata.msg.substring(rdata.msg.indexOf('[')+1,rdata.msg.indexOf(']')) |
|
|
|
num = rdata.msg.substring(rdata.msg.indexOf('[')+1,rdata.msg.indexOf(']')) |
|
|
|
if(num < 5){ |
|
|
|
if(num < 5){ |
|
|
|
$$(".yzm").show(); |
|
|
|
$(".yzm").show(); |
|
|
|
$$(".login").css("height","332px"); |
|
|
|
$(".login").css("height","332px"); |
|
|
|
$$("input[name='code']").val(''); |
|
|
|
$("input[name='code']").val(''); |
|
|
|
$$(".passcode").click(); |
|
|
|
$(".passcode").click(); |
|
|
|
} |
|
|
|
} |
|
|
|
$$(".yzm").show(); |
|
|
|
$(".yzm").show(); |
|
|
|
Wreset(); |
|
|
|
Wreset(); |
|
|
|
layer.msg(rdata.msg,{icon:2,time:5000}); |
|
|
|
layer.msg(rdata.msg,{icon:2,time:5000}); |
|
|
|
return; |
|
|
|
return; |
|
|
|