mirror of
https://gitee.com/coder-xiaomo/flashsale
synced 2025-01-11 12:18:22 +08:00
38 lines
808 B
JavaScript
38 lines
808 B
JavaScript
/**
|
|
* reset.js
|
|
*/
|
|
$("button#submit").click(function(){
|
|
doReset();
|
|
});
|
|
$(document).keydown(function(e) {
|
|
if (e.keyCode == 13) {
|
|
doReset();
|
|
}
|
|
});
|
|
|
|
function doReset(){
|
|
var email = $("#resetForm #email").val();
|
|
if(email=="")
|
|
return;
|
|
|
|
$.ajax( {
|
|
url:'/home/users/resetpassword',// 跳转到 action
|
|
data:$('#resetForm').serialize(),
|
|
type:'POST',
|
|
processData:true,
|
|
contentType:"application/x-www-form-urlencoded",
|
|
success:function(data) {
|
|
alert(data.status);
|
|
if(data.status=="success"){
|
|
location.href = "/home/user/validate.jsp";
|
|
}else if(data.status=="fail"){
|
|
alert(data.data.errMessage);
|
|
}
|
|
},
|
|
error : function(e) {
|
|
// view("异常!");
|
|
alert(e);
|
|
}
|
|
});
|
|
|
|
} |