🐛 fixed reset password error

pull/137/head
ruibaby 2019-03-04 21:32:04 +08:00
parent 69d1b1575e
commit ad568bed17
3 changed files with 24 additions and 13 deletions

View File

@ -63,7 +63,7 @@
} }
.form-group { .form-group {
margin-bottom: 24px; margin-bottom: 32px;
} }
#userName,#email { #userName,#email {

View File

@ -11,7 +11,7 @@
<link rel="stylesheet" href="/static/halo-backend/plugins/toast/css/jquery.toast.min.css"> <link rel="stylesheet" href="/static/halo-backend/plugins/toast/css/jquery.toast.min.css">
<link rel="stylesheet" href="/static/halo-backend/css/style.min.css"> <link rel="stylesheet" href="/static/halo-backend/css/style.min.css">
<style> <style>
body{background-color:#f5f5f5}*{outline:0}label{color:#4b1c0f}.loginForm{max-width:380px;margin-top:10%}.loginLogo{font-size:56px;text-align:center;margin-bottom:25px;font-weight:500;color:#444;text-shadow:#b2baba .1em .1em .2em}.loginBody{padding:20px;background-color:#fff;-o-box-shadow:-4px 7px 46px 2px rgba(0,0,0,.1);box-shadow:-4px 7px 46px 2px rgba(0,0,0,.1)}.login-button{background-color:#fff;border-radius:0;border:1px solid #000;transition:all .5s ease-in-out}.login-button:hover{border:1px solid #fff;background-color:#000;color:#fff}.form-group{margin-bottom: 24px;}#loginName,#loginPwd{border-radius:0}.control{padding-bottom:5px} body{background-color:#f5f5f5}*{outline:0}label{color:#4b1c0f}.loginForm{max-width:380px;margin-top:10%}.loginLogo{font-size:56px;text-align:center;margin-bottom:25px;font-weight:500;color:#444;text-shadow:#b2baba .1em .1em .2em}.loginBody{padding:20px;background-color:#fff;-o-box-shadow:-4px 7px 46px 2px rgba(0,0,0,.1);box-shadow:-4px 7px 46px 2px rgba(0,0,0,.1)}.login-button{background-color:#fff;border-radius:0;border:1px solid #000;transition:all .5s ease-in-out}.login-button:hover{border:1px solid #fff;background-color:#000;color:#fff}.form-group{margin-bottom: 32px;}#loginName,#loginPwd{border-radius:0}.control{padding-bottom:5px}
</style> </style>
</head> </head>
<body> <body>

View File

@ -63,7 +63,7 @@
} }
.form-group { .form-group {
margin-bottom: 24px; margin-bottom: 32px;
} }
#password,#definePassword { #password,#definePassword {
@ -107,17 +107,28 @@
if (password.val() === "" || definePassword.val() === "") { if (password.val() === "" || definePassword.val() === "") {
halo.showMsg("请输入完整信息!", 'info', 2000); halo.showMsg("请输入完整信息!", 'info', 2000);
} else { } else {
$.post('/admin/resetPassword',{ $.ajax({
'password': password.val(), url: '/admin/resetPassword',
'definePassword': definePassword.val(), dataType: 'JSON',
type: 'post',
contentType: 'application/json',
data: JSON.stringify({
"password": password.val(),
"definePassword": definePassword.val(),
'code': '${code}' 'code': '${code}'
},function (data) { }),
processData: false,
success: function( data, textStatus, jQxhr ){
if (data.code === 1) { if (data.code === 1) {
halo.showMsgAndRedirect(data.msg,'success',1000,"/admin/login") halo.showMsgAndRedirect(data.msg,'success',1000,"/admin/login")
} else { } else {
halo.showMsg(data.msg,'error',2000); halo.showMsg(data.msg,'error',2000);
} }
},'JSON'); },
error: function( jqXhr, textStatus, errorThrown ){
console.log( errorThrown );
}
});
} }
} }
</script> </script>