浏览代码

标的物不显示处理

WH01243 2 年之前
父节点
当前提交
6bfa4cee50
共有 2 个文件被更改,包括 16 次插入9 次删除
  1. 10 5
      src/jfw/front/shorturl.go
  2. 6 4
      src/jfw/modules/app/src/app/front/shorturl.go

+ 10 - 5
src/jfw/front/shorturl.go

@@ -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

+ 6 - 4
src/jfw/modules/app/src/app/front/shorturl.go

@@ -659,10 +659,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++
 			}
 		}
 	}
@@ -708,6 +708,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"
@@ -724,6 +725,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