激活提示页的更换邮箱,点击确定后应该马上给新的邮箱地址发送激活邮件

This commit is contained in:
daiao 2017-03-27 15:07:49 +08:00
parent b213cd7546
commit c5826a04a2
1 changed files with 8 additions and 3 deletions

View File

@ -59,13 +59,18 @@
if($mail_correct == false){
return
}else{
// 改变邮箱地址
$.get('<%= account_change_email_path(:user_id => @user.id) %>',
{ valid: "mail",
value: document.getElementById("user_mail").value },
function (data){
$("#user_email_show").html(data.email);
hideModal();
return;
$("#user_email_show").html(data.email);
// 更改邮箱地址后,直接给用户发送邮件
$.ajax({
url: "<%= resendmail_path(:user => @user) %>"
});
hideModal();
return;
});
}
}