From b7b69e2d0e929d1c6f371badbbc0b2e5b034b026 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 15 Jul 2019 17:35:10 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user.json.jbuilder | 2 +- app/views/users/get_user_info.json.jbuilder | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/users/_user.json.jbuilder b/app/views/users/_user.json.jbuilder index 66ea1530e..afec979a1 100644 --- a/app/views/users/_user.json.jbuilder +++ b/app/views/users/_user.json.jbuilder @@ -3,5 +3,5 @@ json.login user.login json.name user.full_name json.grade user.grade # json.email user.mail # 邮箱原则上不暴露的,如果实在需要的话只能对某些具体的接口公开 -json.image_url image_url(url_to_avatar(user)) +json.image_url url_to_avatar(user) json.school user.school_name \ No newline at end of file diff --git a/app/views/users/get_user_info.json.jbuilder b/app/views/users/get_user_info.json.jbuilder index 779d58e95..fe8400ffd 100644 --- a/app/views/users/get_user_info.json.jbuilder +++ b/app/views/users/get_user_info.json.jbuilder @@ -1,7 +1,9 @@ json.username @user.full_name json.login @user.login json.user_id @user.id -json.image_url url_to_avatar(@user) +json.image_url image_url(url_to_avatar(@user)) +json.image_path image_path(url_to_avatar(@user)) +json.image_tag image_tag(url_to_avatar(@user)) json.admin @user.admin? json.is_teacher @user.user_extension&.teacher? json.tidding_count 0 From a13a1c328c7aaff62fdec5c5e063d893eae0ed66 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 15 Jul 2019 17:40:14 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/get_user_info.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/get_user_info.json.jbuilder b/app/views/users/get_user_info.json.jbuilder index fe8400ffd..ba53d0c2a 100644 --- a/app/views/users/get_user_info.json.jbuilder +++ b/app/views/users/get_user_info.json.jbuilder @@ -1,7 +1,7 @@ json.username @user.full_name json.login @user.login json.user_id @user.id -json.image_url image_url(url_to_avatar(@user)) +json.image_url url_to_avatar(@user) json.image_path image_path(url_to_avatar(@user)) json.image_tag image_tag(url_to_avatar(@user)) json.admin @user.admin? From 1857679d41f1a5458eaea223e4233edef3e1e60b Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 15 Jul 2019 17:41:21 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/get_user_info.json.jbuilder | 1 - 1 file changed, 1 deletion(-) diff --git a/app/views/users/get_user_info.json.jbuilder b/app/views/users/get_user_info.json.jbuilder index ba53d0c2a..2e1fad2e6 100644 --- a/app/views/users/get_user_info.json.jbuilder +++ b/app/views/users/get_user_info.json.jbuilder @@ -2,7 +2,6 @@ json.username @user.full_name json.login @user.login json.user_id @user.id json.image_url url_to_avatar(@user) -json.image_path image_path(url_to_avatar(@user)) json.image_tag image_tag(url_to_avatar(@user)) json.admin @user.admin? json.is_teacher @user.user_extension&.teacher?