From be0158fbb0e4ccc3fe81d47c3e364b59154c6e70 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Thu, 8 Sep 2016 14:10:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E4=BA=8C=E7=BA=A7=E5=9B=9E?= =?UTF-8?q?=E5=A4=8DBUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/new_comment.rb | 2 +- app/api/mobile/entities/user.rb | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/api/mobile/apis/new_comment.rb b/app/api/mobile/apis/new_comment.rb index d98977661..e72daae6d 100644 --- a/app/api/mobile/apis/new_comment.rb +++ b/app/api/mobile/apis/new_comment.rb @@ -189,7 +189,7 @@ module Mobile reply.content = params[:content] reply.parent_id = params[:id] reply.subject = "RE: #{topic.subject}" - if topic.children << reply + if message.children << reply result = 2 update_id = topic.id end diff --git a/app/api/mobile/entities/user.rb b/app/api/mobile/entities/user.rb index 657b1cb7b..30a2a7edd 100644 --- a/app/api/mobile/entities/user.rb +++ b/app/api/mobile/entities/user.rb @@ -30,19 +30,24 @@ module Mobile u.nil? ? "" : u.show_name when :roles_id u[:roles_id].nil? ? nil : u.roles_id + when :login + u.login + when :lastname + u.lastname + when :mail + u.mail end end end - end end expose :id #头像 - expose :login - expose :lastname + user_expose :login + user_expose :lastname #邮箱地址 - expose :mail + user_expose :mail expose :nickname #真名 user_expose :img_url