|
@@ -175,6 +175,8 @@ func (s *Short) LoginCommon(userId, stype, id string) error {
|
|
|
retMap["subtype"], _ = obj["subtype"].(string)
|
|
|
retMap["subscopeclass"], _ = obj["s_subscopeclass"].(string)
|
|
|
retMap["publishtime"] = util.IntAll(obj["publishtime"])
|
|
|
+ retMap["keywords"] = KeyWordHandle(obj)
|
|
|
+ retMap["description"] = DescriptionHandle(stype, obj)
|
|
|
}
|
|
|
s.T["shareid"] = config.Seoconfig["baiduSEM-p"].(string)
|
|
|
s.T["logid"] = config.Seoconfig["baiduSEM-p"].(string)
|
|
@@ -255,8 +257,9 @@ func (s *Short) LoginCommon(userId, stype, id string) error {
|
|
|
obj["publishtimeShorDate"] = time.Unix(util.Int64All(obj["publishtime"]), 0).Format(date.Date_Short_Layout)
|
|
|
}
|
|
|
s.T["url"] = s.Uri()
|
|
|
+ obj["keywords"] = KeyWordHandle(obj)
|
|
|
+ obj["description"] = DescriptionHandle(stype, obj)
|
|
|
s.T["obj"] = obj
|
|
|
-
|
|
|
content, _ := s.Render4Cache("/pc/biddetail_rec.html", &s.T)
|
|
|
redis.Put("newother", catchKey, string(content), 60*20)
|
|
|
return s.SetBody(content)
|
|
@@ -1169,10 +1172,10 @@ func KeyWordHandle(obj map[string]interface{}) string {
|
|
|
for _, v := range gconv.SliceMap(obj["purchasinglist"]) {
|
|
|
if i == 5 {
|
|
|
break
|
|
|
- if util.InterfaceToStr(v["itemname"]) != "" && util.InterfaceToStr(obj["s_winner"]) != config.Sysconfig["detailMosaicTxt"] {
|
|
|
- keywordArr = append(keywordArr, util.InterfaceToStr(v["itemname"]))
|
|
|
- i++
|
|
|
- }
|
|
|
+ }
|
|
|
+ if util.InterfaceToStr(v["itemname"]) != "" && util.InterfaceToStr(obj["s_winner"]) != config.Sysconfig["detailMosaicTxt"] {
|
|
|
+ keywordArr = append(keywordArr, util.InterfaceToStr(v["itemname"]))
|
|
|
+ i++
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1221,6 +1224,7 @@ func DescriptionHandle(stype string, obj map[string]interface{}) string {
|
|
|
if publishtime != 0 {
|
|
|
descriptionArr = append(descriptionArr, fmt.Sprintf("公告日期:%s", pushTime.Format("2006年01月02日")))
|
|
|
}
|
|
|
+ descriptionArr = append(descriptionArr, "查看该项目信息详情请访问剑鱼标讯官网。")
|
|
|
description = strings.Join(descriptionArr, ",")
|
|
|
} else {
|
|
|
//descriptionStr = "%s,项目所属地区是%s%s,项目采购单位是%s,项目发布时间是%s"
|
|
@@ -1237,6 +1241,7 @@ func DescriptionHandle(stype string, obj map[string]interface{}) string {
|
|
|
if publishtime != 0 {
|
|
|
descriptionArr = append(descriptionArr, fmt.Sprintf("项目发布时间是%s", pushTime.Format("2006年01月02日")))
|
|
|
}
|
|
|
+ descriptionArr = append(descriptionArr, "查看该项目信息详情请访问剑鱼标讯官网。")
|
|
|
description = strings.Join(descriptionArr, ",")
|
|
|
}
|
|
|
return description
|