This commit is contained in:
sw 2015-04-16 15:54:47 +08:00
commit 9819e1ce45
3 changed files with 5 additions and 3 deletions

View File

@ -34,6 +34,8 @@ module Mobile
user_expose :img_url
#昵称
expose :nickname
#真名
expose :realname
#性别
user_expose :gender
#我的二维码

View File

@ -40,9 +40,9 @@ class CoursesService
end
@courses = courses_all.visible(current_user)
if params[:name].present?
@courses_all = @courses.like(params[:name])
@courses_all = @courses.like(params[:name]).order("created_at desc")
else
@courses_all = @courses;
@courses_all = @courses.order("created_at desc");
end
@courses_all
course_list = []

View File

@ -77,7 +77,7 @@ class UsersService
gender = @user.user_extensions.gender.nil? ? 0 : @user.user_extensions.gender
work_unit = get_user_work_unit @user
location = get_user_location @user
{:id => @user.id, :img_url => img_url, :nickname => @user.login, :gender => gender, :work_unit => work_unit, :mail => @user.mail, :location => location, :brief_introduction => @user.user_extensions.brief_introduction}
{:id => @user.id, :img_url => img_url,:realname => @user.realname, :nickname => @user.login, :gender => gender, :work_unit => work_unit, :mail => @user.mail, :location => location, :brief_introduction => @user.user_extensions.brief_introduction}
end
#忘记密码