From 4ff6a9be979320a257a34a186fb5617ec510b52f Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 19 Jul 2019 16:26:49 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/routes.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/routes.rb b/config/routes.rb index 427b4744..a3ead6fc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1430,6 +1430,7 @@ RedmineApp::Application.routes.draw do ## oauth相关 match 'welcome/contest', :via => :get get 'welcome/ccf' get 'welcome/import_users' + get 'welcome/user_agents' # end longjun #added by nie From ec9c0988d180cd40ce2ad41e11a2c75a835e1c86 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 19 Jul 2019 16:31:17 +0800 Subject: [PATCH 2/5] 1 --- config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index a3ead6fc..c967e51f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -297,6 +297,7 @@ RedmineApp::Application.routes.draw do ## oauth相关 get 'welcome/shixun_to_local' => 'welcome#shixun_to_local' get 'welcome/local_to_shixun' => 'welcome#local_to_shixun' get 'welcome/local_init' => 'welcome#local_init' + get 'welcome/user_agents' => 'welcome#user_agents' # get 'competitions/home' => 'competitions#home' # get 'competitions/hn' => 'competitions#index' @@ -1430,7 +1431,6 @@ RedmineApp::Application.routes.draw do ## oauth相关 match 'welcome/contest', :via => :get get 'welcome/ccf' get 'welcome/import_users' - get 'welcome/user_agents' # end longjun #added by nie From 36b712ab05fb21e429813bfb1275641c05e9ec28 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 19 Jul 2019 16:33:20 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=BC=95=E6=B5=81=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=8A=A5500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/welcome_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 85dff69a..013b9c7d 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -42,7 +42,7 @@ 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 From 1d2748ee8694a924e9e5069adb05ed92cc975f9b Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 19 Jul 2019 16:35:13 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=8A=A5=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/welcome/_user_agent_list.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@