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

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