fixed 小程序活动报名信息

This commit is contained in:
“xxq250” 2022-11-04 14:37:52 +08:00
parent a4df928c5a
commit dbc1ea107c
1 changed files with 3 additions and 3 deletions

View File

@ -21,11 +21,11 @@ class PlatformCommunicate < ApplicationRecord
has_many :watchers, as: :watchable, dependent: :destroy
def watched_ext_info(user_id)
ext_info = self.watchers.find_by(user_id: user_id)
return [] if ext_info.blank?
watcher = self.watchers.find_by(user_id: user_id)
return [] if watcher.blank?
str = []
self.enroll_field.to_s.split(",").each_with_index do |m, index|
str.push("#{ext_info["ext#{index + 1}"]}")
str.push("#{watcher.ext_info["ext#{index + 1}"]}")
end
str
end