|
|
@ -24,22 +24,41 @@ module WelcomeHelper
|
|
|
|
|
|
|
|
|
|
|
|
# 引流注册情况
|
|
|
|
# 引流注册情况
|
|
|
|
def register_info user_agent
|
|
|
|
def register_info user_agent
|
|
|
|
if user_agent.agent_type.to_i == UserAgent::USER_AD
|
|
|
|
case user_agent.register_status
|
|
|
|
user_id = user_agent.user_actionss.first.try(:user_id)
|
|
|
|
when 0
|
|
|
|
if user_id && User.where("id = #{user_id} and created_on < '2019-07-15 00:00:00'").present?
|
|
|
|
"改IP未登录"
|
|
|
|
"代理前注册"
|
|
|
|
when 1
|
|
|
|
else
|
|
|
|
"代理之前注册"
|
|
|
|
"未转换"
|
|
|
|
when 2
|
|
|
|
end
|
|
|
|
"代理之后注册"
|
|
|
|
elsif user_agent.agent_type.to_i == UserAgent::USER_REGISTER || UserActions.find_by_ip(user_agent.ip)
|
|
|
|
end
|
|
|
|
"代理后注册"
|
|
|
|
# if user_agent.agent_type.to_i == UserAgent::USER_AD
|
|
|
|
else
|
|
|
|
# user_id = user_agent.user_actionss.first.try(:user_id)
|
|
|
|
user_id = user_agent.user_actionss.first.try(:user_id)
|
|
|
|
# if user_id && User.where("id = #{user_id} and created_on < '2019-07-15 00:00:00'").present?
|
|
|
|
if user_id && User.where("id = #{user_id} and created_on < '2019-07-15 00:00:00'").present?
|
|
|
|
# "代理前注册"
|
|
|
|
"代理前注册"
|
|
|
|
# else
|
|
|
|
else
|
|
|
|
# "未转换"
|
|
|
|
"代理后注册"
|
|
|
|
# end
|
|
|
|
end
|
|
|
|
# elsif user_agent.agent_type.to_i == UserAgent::USER_REGISTER || UserActions.find_by_ip(user_agent.ip)
|
|
|
|
|
|
|
|
# "代理后注册"
|
|
|
|
|
|
|
|
# else
|
|
|
|
|
|
|
|
# user_id = user_agent.user_actionss.first.try(:user_id)
|
|
|
|
|
|
|
|
# if user_id && User.where("id = #{user_id} and created_on < '2019-07-15 00:00:00'").present?
|
|
|
|
|
|
|
|
# "代理前注册"
|
|
|
|
|
|
|
|
# else
|
|
|
|
|
|
|
|
# "代理后注册"
|
|
|
|
|
|
|
|
# end
|
|
|
|
|
|
|
|
# end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def competion_info user_agent
|
|
|
|
|
|
|
|
case user_agent.action_status
|
|
|
|
|
|
|
|
when 0
|
|
|
|
|
|
|
|
"未报名"
|
|
|
|
|
|
|
|
when 1
|
|
|
|
|
|
|
|
"代理之前报名"
|
|
|
|
|
|
|
|
when 2
|
|
|
|
|
|
|
|
"代理之后报名"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|