Browse Source

feat:查看原文展示逻辑调整

fuwencai 1 year ago
parent
commit
7ddee7a7bc

+ 7 - 2
src/jfw/front/swordfish.go

@@ -752,9 +752,14 @@ func ObjData(isPayUser bool, sid, content string, lent int) (t bool, obj map[str
 		obj["_id"] = encrypt.EncodeArticleId2ByCheck(sid)
 		infoformat := util.IntAllDef(obj["infoformat"], 1)
 		obj["infoformat"] = infoformat
-		//精准字段(竞争对手的地址) 或  拟建项目
-		if obj["competehref"] != nil || infoformat == 2 {
+		// p385调整为 除了从竞品爬虫到的新数据,不展示“查看原文链接”入口,其他公告都展示“查看原文链接”入口(包含客户管理系统-结构化数据,查看的标讯详情页)
+		// 精准字段(竞争对手的地址) 或  拟建项目
+		//competehref字段来源:
+		//1、竞品采集 href="#" competehref=原网址
+		//2、2021-11-01后新增的爬虫 href=原网址 competehref="#"
+		if util.ObjToString(obj["href"]) == "#" || infoformat == 2 {
 			delete(obj, "href")
+			delete(obj, "competehref")
 		}
 		if strings.Trim(util.ObjToString(obj["detail"]), " ") == "" {
 			obj["detail"] = ""

+ 2 - 1
src/jfw/modules/app/src/app/front/swordfish.go

@@ -542,8 +542,9 @@ func wxvisitD(sid, userId string, isPayUser bool) (objdata map[string]interface{
 			var infoformat = util.IntAllDef(obj["infoformat"], 1)
 			obj["infoformat"] = infoformat
 			//精准字段(竞争对手的地址) 或  拟建项目
-			if obj["competehref"] != nil || infoformat == 2 {
+			if util.ObjToString(obj["href"]) == "#" || infoformat == 2 {
 				delete(obj, "href")
+				delete(obj, "competehref")
 			}
 			//if userId != "" {
 			//pcode, _ := obj["projectcode"].(string)

+ 2 - 1
src/jfw/modules/bigmember/src/service/chatShare/obtainDetails.go

@@ -222,8 +222,9 @@ func ObjData(sid, content string, isPayUser bool) (obj map[string]interface{}) {
 		infoformat := qutil.IntAllDef(obj["infoformat"], 1)
 		obj["infoformat"] = infoformat
 		//精准字段(竞争对手的地址) 或  拟建项目
-		if obj["competehref"] != nil || infoformat == 2 {
+		if qutil.ObjToString(obj["href"]) == "#" || infoformat == 2 {
 			delete(obj, "href")
+			delete(obj, "competehref")
 		}
 	}
 	return

+ 2 - 1
src/jfw/modules/publicapply/src/userbase/entity/entity.go

@@ -557,8 +557,9 @@ func GetOriginalTextUrl(biddingId string) (href string) {
 		obj["infoformat"] = infoformat
 		//精准字段(竞争对手的地址) 或  拟建项目不返回原文地址
 		// infoformat: 拟建数据标识
-		if obj["competehref"] != nil || infoformat == 2 {
+		if util.ObjToString(obj["href"]) == "#" || infoformat == 2 {
 			delete(obj, "href")
+			delete(obj, "competehref")
 		} else {
 			href = util.ObjToString(obj["href"])
 			if href != "" {