diff --git a/app/controllers/ecloud_controller.rb b/app/controllers/ecloud_controller.rb index ac303ce3..3e02c579 100644 --- a/app/controllers/ecloud_controller.rb +++ b/app/controllers/ecloud_controller.rb @@ -18,7 +18,7 @@ class EcloudController < ApplicationController skip_before_filter :verify_authenticity_token before_filter :save_para - # before_filter :check_sign, only: [:ps_new, :ps_update, :bs_new, :bs_update] + before_filter :check_sign, only: [:ps_new, :ps_update, :bs_new, :bs_update] before_filter :user_setup # before_filter :require_login, only: [:authorize] diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index b3d944f5..e7273b94 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -29,7 +29,7 @@ class ManagementsController < ApplicationController end def user_agents - @user_agents = UserAgent.where("user_agents.key is not null") + @user_agents = UserAgent.where("user_agents.key is not order by action_status, register_status") @agents_count = @user_agents.count limit = 20 @agents_pages = Paginator.new @agents_count, limit, params['page'] || 1 diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 251e6de7..bd850ac6 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -42,7 +42,9 @@ class WelcomeController < ApplicationController # 运营引流个人数据展示 def user_agents - @user_agents = UserAgent.where(key: params[:edu]) + @user_agents = UserAgent.where(key: params[:edu]).order("register_status desc, action_status desc") + @action_count = @user_agents.where(action_status: 2).count + @register_count = @user_agents.where(register_status: 2).count @agents_count = @user_agents.count limit = 20 @agents_pages = Paginator.new @agents_count, limit, params['page'] || 1 diff --git a/app/views/managements/_user_agent_list.html.erb b/app/views/managements/_user_agent_list.html.erb index 43886c8d..6b47e51c 100644 --- a/app/views/managements/_user_agent_list.html.erb +++ b/app/views/managements/_user_agent_list.html.erb @@ -4,9 +4,9 @@
ID | +序号 | 代理人登录名 | 代理人姓名 | 注册情况 | diff --git a/app/views/welcome/user_agents.html.erb b/app/views/welcome/user_agents.html.erb index 4fe6649c..f81c537e 100644 --- a/app/views/welcome/user_agents.html.erb +++ b/app/views/welcome/user_agents.html.erb @@ -1,7 +1,6 @@
---|