|
|
@ -188,7 +188,7 @@ end
|
|
|
|
# 系统全局认证
|
|
|
|
# 系统全局认证
|
|
|
|
def check_auth
|
|
|
|
def check_auth
|
|
|
|
if current_user.certification != 1 && current_user.apply_actions.exists?(container_type: 'TrialAuthorization', status: 0)
|
|
|
|
if current_user.certification != 1 && current_user.apply_actions.exists?(container_type: 'TrialAuthorization', status: 0)
|
|
|
|
tip_exception(-1, "您的试用申请正在审核中,请耐心等待")
|
|
|
|
tip_exception(408, "您的试用申请正在审核中,请耐心等待")
|
|
|
|
elsif current_user.certification != 1
|
|
|
|
elsif current_user.certification != 1
|
|
|
|
day_cer = UserDayCertification.find_by(user_id: current_user.id)
|
|
|
|
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
|
|
|
|
tip_exception(407, "系统未授权") unless (Time.now.to_i - day_cer.try(:created_at).to_i) < 86400
|
|
|
|