layui.use(["form","layer","jquery"],function(){var i=layui.form,t=layui.layer,a=layui.jquery;a(function(){a.ajax({url:"ajax.php",dataType:"json",success:function(i){"No Act!"==i.msg&&(window.location.href="home.html")}})}),i.on("submit(login)",function(i){var o=t.msg("数据提交中，请稍候",{icon:16,time:!1,shade:.8});return a.ajax({url:"ajax.php?act=login",type:"POST",data:i.field,dataType:"json",success:function(i){setTimeout(function(){t.close(o),t.msg(i.msg,{icon:i.code,time:1e3}),setTimeout(function(){1==i.code&&(window.location.href="home.html")},1500)},500)}}),!1}),a(".loginBody .input-item").click(function(i){i.stopPropagation(),a(this).addClass("layui-input-focus").find(".layui-input").focus()}),a(".loginBody .layui-form-item .layui-input").focus(function(){a(this).parent().addClass("layui-input-focus")}),a(".loginBody .layui-form-item .layui-input").blur(function(){a(this).parent().removeClass("layui-input-focus"),""!=a(this).val()?a(this).parent().addClass("layui-input-active"):a(this).parent().removeClass("layui-input-active")})});