diff --git a/app/views/managements/_user_list.html.erb b/app/views/managements/_user_list.html.erb index d77fa954..d2bc0fef 100644 --- a/app/views/managements/_user_list.html.erb +++ b/app/views/managements/_user_list.html.erb @@ -65,15 +65,9 @@ }else{ var order = "desc" } - var user_status = $("input[name='user_status']").val(); - var research_condition = $("input[name='research_condition']").val(); - var research_contents = $("input[name='research_contents']").val(); - $.ajax({ - url: "<%= users_managements_path %>", - type: "post", - dataType: "script", - data: {us_order : order, order_key: "created_on", user_status:user_status, research_condition:research_condition, research_contents:research_contents} - }); + $("input[name='us_order']").val(order); + $("input[name='order_key']").val("created_on"); + $("#managements_users_search").submit(); }); // 按最后登录时间排序 $("#user_last_order").on("click", function(){ @@ -83,15 +77,9 @@ }else{ var order = "desc" } - var user_status = $("input[name='user_status']").val(); - var research_condition = $("input[name='research_condition']").val(); - var research_contents = $("input[name='research_contents']").val(); - $.ajax({ - url: "<%= users_managements_path %>", - type: "post", - dataType: "script", - data: {us_order : order, order_key: "last_login_on", user_status:user_status, research_condition:research_condition, research_contents:research_contents} - }); + $("input[name='us_order']").val(order); + $("input[name='order_key']").val("last_login_on"); + $("#managements_users_search").submit(); }); // 按经验值排序 $("#user_experience_order").on("click", function(){ @@ -101,16 +89,10 @@ }else{ var order = "desc" } - var user_status = $("input[name='user_status']").val(); - var research_condition = $("input[name='research_condition']").val(); - var research_contents = $("input[name='research_contents']").val(); - $.ajax({ - url: "<%= users_managements_path %>", - type: "post", - dataType: "script", - data: {us_order : order, order_key: "experience", user_status:user_status, research_condition:research_condition, research_contents:research_contents} - }); - }) + $("input[name='us_order']").val(order); + $("input[name='order_key']").val("experience"); + $("#managements_users_search").submit(); + }); // 按金币排序 $("#user_grade_order").on("click", function(){ @@ -120,14 +102,8 @@ }else{ var order = "desc" } - var user_status = $("input[name='user_status']").val(); - var research_condition = $("input[name='research_condition']").val(); - var research_contents = $("input[name='research_contents']").val(); - $.ajax({ - url: "<%= users_managements_path %>", - type: "post", - dataType: "script", - data: {us_order : order, order_key: "grade", user_status:user_status, research_condition:research_condition, research_contents:research_contents} - }); + $("input[name='us_order']").val(order); + $("input[name='order_key']").val("grade"); + $("#managements_users_search").submit(); }) \ No newline at end of file diff --git a/app/views/managements/users.html.erb b/app/views/managements/users.html.erb index 9b01dab3..3117e124 100644 --- a/app/views/managements/users.html.erb +++ b/app/views/managements/users.html.erb @@ -44,6 +44,9 @@
+ + + 搜索 清除