diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 875050642..6a7599f28 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -184,14 +184,13 @@ class ApplicationController < ActionController::Base end # 系统全局认证 - # def check_auth - if !current_user.profile_completed? - info_url = '/account/profile' - tip_exception(402, info_url) - elsif current_user.certification != 1 + if current_user.certification != 1 day_cer = UserDayCertification.find_by(user_id: current_user.id) tip_exception(407, "系统未授权") unless (Time.now.to_i - day_cer.try(:created_at).to_i) < 86400 + elsif !current_user.profile_completed? + info_url = '/account/profile' + tip_exception(402, info_url) end end