layui.use(["form"],function(){var e=layui.form,a=layui.jquery;a.ajax({url:"../../ajax.php?act=systemParameter",type:"get",dataType:"json",success:function(e){a(".user").val(e.data.user)}}),e.verify({user:function(e,a){if(e.length<5)return"用户名长度不能小于5位"},pass:function(e,a){if(e.length<6)return"密码长度不能小于6位"},newPwd:function(e,a){if(e.length<6)return"密码长度不能小于6位"},confirmPwd:function(e,t){if(!new RegExp(a(".oldPwd").val()).test(e))return"两次输入密码不一致，请重新输入！"}}),e.on("submit(changePwd)",function(e){var t=a(".user").val(),n=a(".pass").val(),s=a(".confirmPwd").val(),u=layui.layer.msg("数据提交中，请稍候",{icon:16,time:!1,shade:.8});return a.ajax({url:"../../ajax.php?act=setaccount",type:"post",data:{user:t,pass:n,confirmPwd:s},dataType:"json",success:function(e){"修改成功！"==e.data.msg?setTimeout(function(){layer.close(u),layer.msg(e.data.msg,{icon:1,time:1e3})},500):setTimeout(function(){layer.close(u),layer.msg(e.data.msg,{icon:2,time:1e3})},500)}}),!1})});