Browse Source

描述判断修改

WH01243 2 years ago
parent
commit
94090e6b66
2 changed files with 8 additions and 14 deletions
  1. 4 7
      src/jfw/front/shorturl.go
  2. 4 7
      src/jfw/modules/app/src/app/front/shorturl.go

+ 4 - 7
src/jfw/front/shorturl.go

@@ -1189,17 +1189,14 @@ func DescriptionHandle(stype string, obj map[string]interface{}) string {
 	descriptionStr := ""
 	description := ""
 	pushTime := time.Unix(util.Int64All(obj["publishtime"]), 0)
-	if stype == "nologin" {
-		//nologin
-		//{项目标题},项目所属地区是{省份}{城市},项目采购单位是{采购单位名称},项目发布时间是{发布时间}。
-		descriptionStr = "%s,项目所属地区是%s%s,项目采购单位是%s,项目发布时间是%s"
-		description = fmt.Sprintf(descriptionStr, util.InterfaceToStr(obj["title"]), util.InterfaceToStr(obj["area"]), util.InterfaceToStr(obj["city"]), util.InterfaceToStr(obj["buyer"]), pushTime.Format("2006年01月02日"))
-	} else if stype == "bdprivate" {
+	if stype == "bdprivate" {
 		//bdprivate
 		//{项目标题},采购单位:{采购单位名称},成交供应商:{中标企业名称},公告日期:{公告日期}。
 		descriptionStr = "%s,采购单位1:%s,成交供应商:%s,公告日期:%s。"
 		description = fmt.Sprintf(descriptionStr, util.InterfaceToStr(obj["title"]), util.InterfaceToStr(obj["buyer"]), util.InterfaceToStr(obj["s_winner"]), pushTime.Format("2006年01月02日"))
-
+	} else {
+		descriptionStr = "%s,项目所属地区是%s%s,项目采购单位是%s,项目发布时间是%s"
+		description = fmt.Sprintf(descriptionStr, util.InterfaceToStr(obj["title"]), util.InterfaceToStr(obj["area"]), util.InterfaceToStr(obj["city"]), util.InterfaceToStr(obj["buyer"]), pushTime.Format("2006年01月02日"))
 	}
 	return description
 }

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

@@ -677,17 +677,14 @@ func DescriptionHandle(stype string, obj map[string]interface{}) string {
 	descriptionStr := ""
 	description := ""
 	pushTime := time.Unix(util.Int64All(obj["publishtime"]), 0)
-	if stype == "nologin" {
-		//nologin
-		//{项目标题},项目所属地区是{省份}{城市},项目采购单位是{采购单位名称},项目发布时间是{发布时间}。
-		descriptionStr = "%s,项目所属地区是%s%s,项目采购单位是%s,项目发布时间是%s"
-		description = fmt.Sprintf(descriptionStr, util.InterfaceToStr(obj["title"]), util.InterfaceToStr(obj["area"]), util.InterfaceToStr(obj["city"]), util.InterfaceToStr(obj["buyer"]), pushTime.Format("2006年01月02日"))
-	} else if stype == "bdprivate" {
+	if stype == "bdprivate" {
 		//bdprivate
 		//{项目标题},采购单位:{采购单位名称},成交供应商:{中标企业名称},公告日期:{公告日期}。
 		descriptionStr = "%s,采购单位1:%s,成交供应商:%s,公告日期:%s。"
 		description = fmt.Sprintf(descriptionStr, util.InterfaceToStr(obj["title"]), util.InterfaceToStr(obj["buyer"]), util.InterfaceToStr(obj["s_winner"]), pushTime.Format("2006年01月02日"))
-
+	} else {
+		descriptionStr = "%s,项目所属地区是%s%s,项目采购单位是%s,项目发布时间是%s"
+		description = fmt.Sprintf(descriptionStr, util.InterfaceToStr(obj["title"]), util.InterfaceToStr(obj["area"]), util.InterfaceToStr(obj["city"]), util.InterfaceToStr(obj["buyer"]), pushTime.Format("2006年01月02日"))
 	}
 	return description
 }