fix project package time

dev_aliyun
p31729568 5 years ago
parent 0d48fc638a
commit 886de85be1

@ -100,7 +100,7 @@ module Mobile
requires :title, type: String, desc: '标题' requires :title, type: String, desc: '标题'
requires :content, type: String, desc: '描述' requires :content, type: String, desc: '描述'
optional :attachment_ids, type: Array[Integer], desc: '附件ID数组' optional :attachment_ids, type: Array[Integer], desc: '附件ID数组'
requires :deadline_at, type: DateTime, desc: '截止日期' requires :deadline_at, type: String, desc: '截止日期'
optional :min_price, type: Float, desc: '最小费用' optional :min_price, type: Float, desc: '最小费用'
optional :max_price, type: Float, desc: '最大费用' optional :max_price, type: Float, desc: '最大费用'
requires :contact_name, type: String, desc: '联系人姓名' requires :contact_name, type: String, desc: '联系人姓名'
@ -128,7 +128,7 @@ module Mobile
requires :title, type: String, desc: '标题' requires :title, type: String, desc: '标题'
requires :content, type: String, desc: '描述' requires :content, type: String, desc: '描述'
optional :attachment_ids, type: Array[Integer], desc: '附件ID数组' optional :attachment_ids, type: Array[Integer], desc: '附件ID数组'
requires :deadline_at, type: DateTime, desc: '截止日期' requires :deadline_at, type: String, desc: '截止日期'
optional :min_price, type: Float, desc: '最小费用' optional :min_price, type: Float, desc: '最小费用'
optional :max_price, type: Float, desc: '最大费用' optional :max_price, type: Float, desc: '最大费用'
requires :contact_name, type: String, desc: '联系人姓名' requires :contact_name, type: String, desc: '联系人姓名'

@ -21,13 +21,13 @@ module Mobile
expose :contact_phone, if: ->(package, opts){ opts[:user].id == package.creator_id || opts[:user].admin? || opts[:user].business? } expose :contact_phone, if: ->(package, opts){ opts[:user].id == package.creator_id || opts[:user].admin? || opts[:user].business? }
expose :updated_at do |package, _| expose :updated_at do |package, _|
package.updated_at.try(:utc).try(:iso8601) package.updated_at.strftime('%Y-%m-%d %H:%M:%S')
end end
expose :deadline_at do |package, _| expose :deadline_at do |package, _|
package.deadline_at.try(:utc).try(:iso8601) package.deadline_at.try(:strftime, '%Y-%m-%d %H:%M:%S')
end end
expose :published_at do |package, _| expose :published_at do |package, _|
package.published_at.try(:utc).try(:iso8601) package.published_at.try(:strftime, '%Y-%m-%d %H:%M:%S')
end end
expose :creator, if: { type: :show } do |package, _| expose :creator, if: { type: :show } do |package, _|

Loading…
Cancel
Save