mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
修改项目主页的内容
This commit is contained in:
@@ -701,6 +701,10 @@ class User < ApplicationRecord
|
||||
apply.present? && !apply.status.zero?
|
||||
end
|
||||
|
||||
def projects_count
|
||||
Project.joins(:members).where(members: { user_id: self.id })
|
||||
end
|
||||
|
||||
# 是否已经签到
|
||||
def attendance_signed?
|
||||
attendance = Attendance.find_by(user_id: id)
|
||||
|
||||
@@ -4,12 +4,13 @@ json.login @user.login
|
||||
json.user_id @user.id
|
||||
json.image_url url_to_avatar(@user)
|
||||
json.admin @user.admin?
|
||||
json.business @user.business?
|
||||
json.is_teacher @user.user_extension&.teacher?
|
||||
json.user_identity @user.identity
|
||||
json.tidding_count 0
|
||||
json.user_phone_binded @user.phone.present?
|
||||
json.phone @user.phone
|
||||
json.email @user.mail
|
||||
# json.user_phone_binded @user.phone.present?
|
||||
# json.phone @user.phone
|
||||
# json.email @user.mail
|
||||
json.profile_completed @user.profile_completed?
|
||||
json.professional_certification @user.professional_certification
|
||||
|
||||
|
||||
|
||||
@@ -6,9 +6,8 @@ json.fan_count @user.fan_count
|
||||
json.identity @user.identity
|
||||
json.brief_introduction @user.user_extension&.brief_introduction
|
||||
json.professional_certification @user.professional_certification
|
||||
json.phone_binded @user.phone_binded?
|
||||
json.email_binded @user.email_binded?
|
||||
json.followed User.current.watched?(@user)
|
||||
json.projects_count @user.projects_count
|
||||
|
||||
# json.id @user.id
|
||||
# json.name @user.full_name
|
||||
|
||||
Reference in New Issue
Block a user