瀏覽代碼

fix:app打码修改

duxin 2 年之前
父節點
當前提交
69aa58b6fe

+ 1 - 1
src/jfw/front/classificationTag.go

@@ -304,7 +304,7 @@ func HotBuyerList(entIsNew bool) []*BuyerList {
 	buyerQuery := fmt.Sprintf(`{"query": {"bool": {"must": [{"exists": {"field": "name"}}]}},"from": %d,"size": %d}`, start, 200)
 	log.Println("buyerQuery:", buyerQuery)
 	data := elastic.Get("buyer", "buyer", buyerQuery)
-	if len(*data) > 0 {
+	if data != nil && len(*data) > 0 {
 		var buyerList []*BuyerList
 		for _, b := range *data {
 			name := qu.ObjToString(b["name"])

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

@@ -187,11 +187,7 @@ func (s *Short) Article(stype, id string) error {
 			}
 			s.T["canRead"] = canRead
 		}
-		if userId == "" {
-			canRead = true
-			s.T["canRead"] = canRead
-		}
-		if canRead || (util.ObjToString(obj["subtype"]) == "拟建" || util.ObjToString(obj["subtype"]) == "采购意向") {
+		if canRead || userId == "" || (util.ObjToString(obj["subtype"]) == "拟建" || util.ObjToString(obj["subtype"]) == "采购意向") {
 			if belongUserId != "" && belongUserId != userId && util.ObjToString(obj["subtype"]) != "拟建" && userId != "" { //分享开打的
 				article_id := encrypt.CommonDecodeArticle(stype, id)[0]
 				key := fmt.Sprintf("integral_article_%s_%s_%s", article_id, belongUserId, userId)
@@ -268,12 +264,13 @@ func (s *Short) Article(stype, id string) error {
 					obj["detail"] = strings.ReplaceAll(strings.ReplaceAll(detail3, `<span class="freeView">点击查看</span><span class="freeView">点击查看</span>`, `<span class="freeView">点击查看</span>`), "*********", code)
 				}
 			}
-			if !canRead { //登录拟建&采购不展示遮罩 只打码
-				obj = otherFilter(obj, userId != "")
+			if !canRead && (util.ObjToString(obj["subtype"]) == "拟建" || util.ObjToString(obj["subtype"]) == "采购意向") { //登录拟建&采购不展示遮罩 只打码
+				otherFilter(obj, userId != "")
 				s.T["canRead"] = true
 			} else if userId == "" {
 				obj = Filter(obj)
 				obj["description"] = fmt.Sprintf("%s,%s。", obj["title"], baseInfo(obj))
+				s.T["canRead"] = true
 			}
 			if obj["l_publishtime"] != nil {
 				obj["publishtimeShorDate"] = time.Unix(util.Int64All(obj["l_publishtime"]), 0).Format(date.Date_Short_Layout)

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

@@ -525,7 +525,7 @@ func wxvisitD(sid, userId string, isPayUser bool) (objdata map[string]interface{
 		if ok && obj != nil && len(obj) >= 3 {
 			if !isPayUser && (util.ObjToString(obj["subtype"]) == "拟建" || util.ObjToString(obj["subtype"]) == "采购意向") {
 				for k, _ := range obj {
-					if k != "title" && k != "area" && k != "subtype" && k != "toptype" && k != "publishtime" && k != "budget" && k != "bidamount" && k != "site" && k != "spidercode" && k != "recommended_service" &&
+					if k != "title" && k != "area" && k != "subtype" && k != "detail" && k != "toptype" && k != "publishtime" && k != "budget" && k != "bidamount" && k != "site" && k != "spidercode" && k != "recommended_service" &&
 						k != "owner" && k != "total_investment" && k != "projectaddr" && k != "projectperiod" && k != "approvedept" && k != "approvecontent" && k != "approvecode" && k != "approvenumber" && k != "approvetime" && k != "approvestatus" && k != "project_scale" && k != "projectname" {
 						delete(obj, k)
 					}

+ 15 - 1
src/jfw/modules/app/src/config.json

@@ -231,5 +231,19 @@
   "detail_element": [
     "table",
     "div"
-  ]
+  ],
+  "purchaseMosaic":{
+    "bidamount": true,
+    "budget": true
+  },
+  "planBuildMosaic": {
+    "approvecode": true,
+    "approvedept": true,
+    "approvestatus": true,
+    "approvetime": true,
+    "approvenumber": true,
+    "approvecontent": true,
+    "projecttype": true,
+    "approvecity": true
+  }
 }

+ 1 - 15
src/jfw/modules/app/src/seo.json

@@ -101,19 +101,5 @@
 	"buryingPointUrl":"https://md.jianyu360.com",
 	"distance":"0",
 	"wxDomain":"http://web1-jydev-zxl.jianyu360.cn",
-  "jyadd": "https://web2-qmxtest.jydev.jianyu360.com/",
-  "purchaseMosaic":{
-    "bidamount": true,
-    "budget": true
-  },
-  "planBuildMosaic": {
-    "approvecode": true,
-    "approvedept": true,
-    "approvestatus": true,
-    "approvetime": true,
-    "approvenumber": true,
-    "approvecontent": true,
-    "projecttype": true,
-    "approvecity": true
-  }
+  "jyadd": "https://web2-qmxtest.jydev.jianyu360.com/"
 }