diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 62b076754..8187055be 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -239,17 +239,18 @@ class AccountController < ApplicationController end def resendmail - status = 1 + result = {:status=>1, :email=>""} user = User.find(params[:user]) if params[:user] + result[:email] = user.mail token = Token.new(:user => user, :action => "register") if token.save # Mailer.run.register(token) Mailer.register(token).deliver else yield if block_given? - status = 0 + result[:status] = 0 end - render :json => status + render :json => result end def email_activation diff --git a/app/views/account/email_activation.html.erb b/app/views/account/email_activation.html.erb index d625e7fc9..9655efcf4 100644 --- a/app/views/account/email_activation.html.erb +++ b/app/views/account/email_activation.html.erb @@ -23,9 +23,15 @@ url, {user: id }, function (data) { - console.log("1111111111"); - console.log(data); - $(".email_verify_btn").replaceWith("
激活邮件已发送至您的注册邮箱,请及时登录邮箱进行验证。
"); + //邮箱@之前用a**b格式显示 + var mail = data.email; + var pos = mail.indexOf("@"); + var restr = mail.substring(1,pos-1); + if( mail.split("@")[0].length > 2 ){ + mail = mail.replace(restr,"***"); + } + + $(".email_verify_btn").replaceWith("激活邮件已发送至您的注册邮箱("+mail+"),请及时登录邮箱进行验证。
"); } ); } @@ -37,16 +43,16 @@ pop_up_box(htmlvalue,580,30,50); return; } - $.get( - url, - {user:user,text:$(".email_prompt_mes").val() }, - function (data) { - console.log("2222222"); - console.log(data); - var htmlvalue = "我们将尽快处理好,并通过邮件通知您。感谢您的反馈!
我们将尽快处理好,并通过邮件通知您。感谢您的反馈!