商城c端前端
This commit is contained in:
@@ -44,6 +44,9 @@ type Product struct {
|
||||
Summary string `json:"summary"`
|
||||
ClaimedCount int64 `json:"claimed_count"`
|
||||
IsRecommended bool `json:"is_recommended"`
|
||||
IsLimited bool `json:"is_limited"`
|
||||
StartAt string `json:"start_at"`
|
||||
EndAt string `json:"end_at"`
|
||||
AvailableActions []string `json:"available_actions"`
|
||||
PaymentType string `json:"payment_type,omitempty"`
|
||||
DetailText string `json:"detail_text,omitempty"`
|
||||
@@ -113,7 +116,8 @@ func productFromStore(row store.ManualProduct, detail bool) Product {
|
||||
Category: Category{ID: row.CategoryID, Code: row.CategoryCode, Name: row.CategoryName},
|
||||
Name: row.Name, ShopName: row.ShopName, PriceAmount: row.PriceAmount, Currency: row.Currency,
|
||||
CoverURL: safeHTTPSURL(row.CoverURL), Summary: truncate(detailText, maxSummaryRunes),
|
||||
ClaimedCount: row.ClaimedCount, IsRecommended: row.IsRecommended,
|
||||
ClaimedCount: row.ClaimedCount, IsRecommended: row.IsRecommended, IsLimited: row.EndAt != "",
|
||||
StartAt: row.StartAt, EndAt: row.EndAt,
|
||||
AvailableActions: []string{"contact_support"}}
|
||||
if detail {
|
||||
result.PaymentType = row.PaymentType
|
||||
|
||||
Reference in New Issue
Block a user