优化报500

dev_aliyun
daiao 5 years ago
parent 9f69796286
commit 9baa72ad5b

@ -25,7 +25,7 @@ module WelcomeHelper
# 引流注册情况
def register_info user_agent
if user_agent.agent_type.to_i == UserAgent::USER_AD
user_id = ua.user_actionss.first.try(:user_id)
user_id = user_agent.user_actionss.first.try(:user_id)
if user_id && User.where("user_id = #{user_id} and created_on < '2019-07-15 00:00:00'").present?
"代理前注册"
else
@ -34,7 +34,7 @@ module WelcomeHelper
elsif user_agent.agent_type.to_i == UserAgent::USER_REGISTER || UserActions.find_by_ip(user_agent.ip)
"代理后注册"
else
user_id = ua.user_actionss.first.try(:user_id)
user_id = user_agent.user_actionss.first.try(:user_id)
if user_id && User.where("user_id = #{user_id} and created_on < '2019-07-15 00:00:00'").present?
"代理前注册"
else

Loading…
Cancel
Save