|
|
@@ -74,6 +74,11 @@ func (self *ProductController) Latest() {
|
|
|
if pd.Package {
|
|
|
pd.PackageList = product_model.GetPackageList(pd.Id, true)
|
|
|
}
|
|
|
+ //获取专区名称
|
|
|
+ saleType := product_model.GetProductSaleTypeById(pd.SaleZone)
|
|
|
+ if saleType != nil {
|
|
|
+ pd.SaleZoneName = saleType.Name
|
|
|
+ }
|
|
|
//判断是否预售
|
|
|
pd.IsDeliver = false
|
|
|
pd.DeliverStartTime = pd.DeliverStartAt.Unix()
|
|
|
@@ -266,6 +271,11 @@ func (self *ProductController) GetPdDetail() {
|
|
|
if pd.Package {
|
|
|
pd.PackageList = product_model.GetPackageList(pd.Id, true)
|
|
|
}
|
|
|
+ //获取专区名称
|
|
|
+ saleType := product_model.GetProductSaleTypeById(pd.SaleZone)
|
|
|
+ if saleType != nil {
|
|
|
+ pd.SaleZoneName = saleType.Name
|
|
|
+ }
|
|
|
//判断是否预售
|
|
|
pd.IsDeliver = false
|
|
|
pd.DeliverStartTime = pd.DeliverStartAt.Unix()
|
|
|
@@ -354,6 +364,11 @@ func (self *ProductController) GetProductsByCat() {
|
|
|
if pd.Package {
|
|
|
pd.PackageList = product_model.GetPackageList(pd.Id, true)
|
|
|
}
|
|
|
+ //获取专区名称
|
|
|
+ saleType := product_model.GetProductSaleTypeById(pd.SaleZone)
|
|
|
+ if saleType != nil {
|
|
|
+ pd.SaleZoneName = saleType.Name
|
|
|
+ }
|
|
|
//判断是否预售
|
|
|
pd.IsDeliver = false
|
|
|
pd.DeliverStartTime = pd.DeliverStartAt.Unix()
|
|
|
@@ -439,6 +454,13 @@ func (self *ProductController) GetProductSizesByPid() {
|
|
|
|
|
|
ret := &Ret{}
|
|
|
if product != nil {
|
|
|
+
|
|
|
+ //获取专区名称
|
|
|
+ saleType := product_model.GetProductSaleTypeById(product.SaleZone)
|
|
|
+ if saleType != nil {
|
|
|
+ product.SaleZoneName = saleType.Name
|
|
|
+ }
|
|
|
+
|
|
|
list := product_model.GetProductConfigAttrsByPId(product.RelateProductId)
|
|
|
for _, item := range list {
|
|
|
|