|
|
@ -31,10 +31,10 @@ module Mobile
|
|
|
|
get ':id' do
|
|
|
|
get ':id' do
|
|
|
|
# 记录用户流量源
|
|
|
|
# 记录用户流量源
|
|
|
|
if params[:edu]
|
|
|
|
if params[:edu]
|
|
|
|
ip = request.host
|
|
|
|
ip = @env['REMOTE_HOST']
|
|
|
|
ua = UserAgent.find_by_ip(ip)
|
|
|
|
ua = UserAgent.find_by_ip(ip)
|
|
|
|
unless ua
|
|
|
|
unless ua
|
|
|
|
UserAgent.create(:key => params[:edu].strip, :ip => request.host)
|
|
|
|
UserAgent.create(:key => params[:edu].strip, :ip => ip)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
MemosService.new.show params, current_user
|
|
|
|
MemosService.new.show params, current_user
|
|
|
|