Compare commits

..

2 Commits

Author SHA1 Message Date
邱博亞 308269097f Add notify remote. 2024-09-16 19:20:44 +08:00
邱博亞 3978a741aa Fix feed. 2024-09-16 19:20:44 +08:00
1 changed files with 2 additions and 1 deletions

View File

@ -451,13 +451,14 @@ class EventNews
a["event_date"] = self.event_date a["event_date"] = self.event_date
a["event_end_date"] = self.event_end_date a["event_end_date"] = self.event_end_date
a["postdate"] = self.postdate a["postdate"] = self.postdate
a["image_description_translations"] = self.image_description_translations a["img_description_translations"] = self.image_description_translations
a["image"] = {} a["image"] = {}
a["display_img"] = self.display_img a["display_img"] = self.display_img
if self.image.present? if self.image.present?
a["image"]["original"] = base_url + self.image.url a["image"]["original"] = base_url + self.image.url
a["image"]["thumb"] = base_url + self.image.thumb.url a["image"]["thumb"] = base_url + self.image.thumb.url
a["image"]["mobile"] = base_url + self.image.mobile.url a["image"]["mobile"] = base_url + self.image.mobile.url
a["img_src"] = a["image"]["thumb"] || "/assets/event_news-default.jpg"
image = MiniMagick::Image.open(self.image.path) rescue nil image = MiniMagick::Image.open(self.image.path) rescue nil
if image if image
a["image"]["width"] = image[:width] a["image"]["width"] = image[:width]