|
@@ -153,6 +153,10 @@ func (p *Purchase) HistoryKeywords() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+var (
|
|
|
|
+ titleSuffix = "%s等"
|
|
|
|
+)
|
|
|
|
+
|
|
// 格式化
|
|
// 格式化
|
|
func (p *Purchase) PurchaseListFormat(res []map[string]interface{}) (list []*bxcore.PurchaseList) {
|
|
func (p *Purchase) PurchaseListFormat(res []map[string]interface{}) (list []*bxcore.PurchaseList) {
|
|
for _, rv := range res {
|
|
for _, rv := range res {
|
|
@@ -178,12 +182,20 @@ func (p *Purchase) PurchaseListFormat(res []map[string]interface{}) (list []*bxc
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if len([]rune(title)) > 50 {
|
|
if len([]rune(title)) > 50 {
|
|
- title = string([]rune(title)[:50])
|
|
|
|
|
|
+ title = fmt.Sprintf(titleSuffix, string([]rune(title)[:50]))
|
|
}
|
|
}
|
|
if lastPart != "" {
|
|
if lastPart != "" {
|
|
title = fmt.Sprintf("%s%s%s", title, splitStr, lastPart)
|
|
title = fmt.Sprintf("%s%s%s", title, splitStr, lastPart)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ publicType := MC.InterfaceToStr(rv["public_type"])
|
|
|
|
+ originalTitle := title
|
|
|
|
+ if publicType == "平台发布" && rv["purchasinglist"] != nil {
|
|
|
|
+ purchasingList := MC.ObjArrToMapArr(rv["purchasinglist"].([]interface{}))
|
|
|
|
+ if len(purchasingList) > 1 {
|
|
|
|
+ originalTitle = fmt.Sprintf(titleSuffix, originalTitle)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
regionUrl := ""
|
|
regionUrl := ""
|
|
if district != "" && IC.DistrictMap[district] != "" {
|
|
if district != "" && IC.DistrictMap[district] != "" {
|
|
regionUrl = fmt.Sprintf(AreaLabelLink, "city", IC.DistrictMap[district])
|
|
regionUrl = fmt.Sprintf(AreaLabelLink, "city", IC.DistrictMap[district])
|
|
@@ -257,7 +269,7 @@ func (p *Purchase) PurchaseListFormat(res []map[string]interface{}) (list []*bxc
|
|
Industry: util.IndustryFormat(p.Industry, strings.Trim(MC.ObjToString(rv["s_subscopeclass"]), ",")),
|
|
Industry: util.IndustryFormat(p.Industry, strings.Trim(MC.ObjToString(rv["s_subscopeclass"]), ",")),
|
|
PublicType: MC.InterfaceToStr(rv["public_type"]),
|
|
PublicType: MC.InterfaceToStr(rv["public_type"]),
|
|
IsNew: MC.Int64All(rv["is_yg_new"]), //is_yg_new==1 新的网站来源
|
|
IsNew: MC.Int64All(rv["is_yg_new"]), //is_yg_new==1 新的网站来源
|
|
- OriginalTitle: MC.InterfaceToStr(rv["title"]),
|
|
|
|
|
|
+ OriginalTitle: originalTitle,
|
|
//BuyerPerson: buyerPerson,
|
|
//BuyerPerson: buyerPerson,
|
|
//Agency: agency,
|
|
//Agency: agency,
|
|
//AgencyTel: agencyTel,
|
|
//AgencyTel: agencyTel,
|