From 15e27382094e4be0addf684baadbd03084fca8b2 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sat, 22 Jun 2019 09:25:01 +0800 Subject: [PATCH] start --- app/controllers/users_controller.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 90e2d3a62..9c9d7411c 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -14,8 +14,7 @@ class UsersController < ApplicationController # 贴吧获取用户信接口 def get_user_info begin - @user = User.find(12) - # @user = current_user + @user = current_user # TODO 等消息上线再打开注释 #@tidding_count = unviewed_tiddings(current_user) if current_user.present? @course = @@ -55,8 +54,7 @@ class UsersController < ApplicationController # Redo: 消息总数缓存 def get_navigation_info @old_domain = edu_setting('old_edu_host') - # @user = current_user - @user = User.find(12) + @user = current_user # 新消息数 @new_message = @user.tidings.where("created_at > '#{@user.click_time}'").count > 0 || @user.private_messages.where("created_at > '#{@user.click_time}'").count > 0