From d6c51cce2a571db1f9c410890af03f7a4b6a1a18 Mon Sep 17 00:00:00 2001 From: cxt Date: Sat, 17 Dec 2016 10:20:08 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=EF=BC=9A=E5=A6=82=E5=9B=BE?= =?UTF-8?q?=E5=85=B3=E6=B3=A8=E5=88=97=E8=A1=A8=E4=B8=AD=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=85=B3=E6=B3=A8=E3=80=81=E5=8F=96=E6=B6=88=E5=85=B3=E6=B3=A8?= =?UTF-8?q?=E5=90=8E=E5=85=B3=E6=B3=A8=E6=95=B0=E7=BB=9F=E8=AE=A1=E6=9C=AA?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/new_base_user.html.erb | 2 +- app/views/watchers/_set_watcher.js.erb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index 35b106059..dfa6afb0a 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -143,7 +143,7 @@
  • 关注
    - <%= User.watched_by(@user).count %> + <%= User.watched_by(@user).count %>
  • diff --git a/app/views/watchers/_set_watcher.js.erb b/app/views/watchers/_set_watcher.js.erb index 83358b049..016465391 100644 --- a/app/views/watchers/_set_watcher.js.erb +++ b/app/views/watchers/_set_watcher.js.erb @@ -14,6 +14,8 @@ $("#fans_user_number_div").html('<%= escape_javascript ( link_to User.find(params[:target_id]).watcher_users.count.to_s, {:controller=>"users", :action=>"user_fanslist",:id=>params[:target_id]},:class=>"homepageImageNumber", :id => "user_fans_number") %>'); $("#fans_span").html('<%= count %>'); $("#watch_span").html('<%= count %>'); + $("#user_watchers_number").html('<%= User.watched_by(User.current).count %>'); + $("#user_fans_number").html('<%= User.current.watcher_users.count %>'); //在其他用户的粉丝、关注页面 <% else %> $("#users_list").html("<%= escape_javascript (render :partial => 'users/user_fans_item', :locals => {:list => list,:target=>User.find(params[:target_id]),:action_name=>action_name,:page=>params[:page]}) %>");