From 63a60603f3682d5c4b6508d1fc45d77982666d70 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 6 Jul 2019 09:46:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=95=E7=94=A8=E7=94=B3=E8=AF=B7=E7=9A=84?= =?UTF-8?q?=E7=9F=AD=E4=BF=A1=E9=80=9A=E7=9F=A5=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/account_controller.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 987f2b70..3368da12 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -1066,12 +1066,14 @@ class AccountController < ApplicationController # end elsif !User.current.user_extensions.school.nil? @tip = "申请已提交,我们将在5分钟内完成审核" - unless apply_action.present? + if !apply_action.present? ApplyAction.create(:user_id => User.current.id, :status => 0, :ip_addr => request.remote_ip, :container_type => "TrialAuthorization", :apply_reason => params[:apply_reason]) - begin - status = Trustie::Sms.send(mobile:17680641960, send_type:'user_apply_auth',name:'管理员' ) - rescue => e - Rails.logger.error "发送验证码出错: #{e}" + if user_ex.identity == 0 || user_ex.identity == 2 + begin + status = Trustie::Sms.send(mobile:17680641960, send_type:'user_apply_auth',name:'管理员' ) + rescue => e + Rails.logger.error "发送验证码出错: #{e}" + end end end end