diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 85dff69a..05f04630 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -42,13 +42,16 @@ class WelcomeController < ApplicationController # 运营引流个人数据展示 def user_agents - @user_agents = UserAgent.find_by_key(params[:edu]) + @user_agents = UserAgent.where(key: params[:edu]) @agents_count = @user_agents.count limit = 20 @agents_pages = Paginator.new @agents_count, limit, params['page'] || 1 @offset ||= @agents_pages.offset @user_agents = paginateHelper @user_agents, limit - + respond_to do |format| + format.js + format.html{ render :layout=>'users_base'} + end end diff --git a/app/views/welcome/_user_agent_list.html.erb b/app/views/welcome/_user_agent_list.html.erb index d16787a9..34792244 100644 --- a/app/views/welcome/_user_agent_list.html.erb +++ b/app/views/welcome/_user_agent_list.html.erb @@ -15,7 +15,7 @@