Explorar el Código

fix:采购意向修改

duxin hace 2 años
padre
commit
480ae532fa
Se han modificado 3 ficheros con 11 adiciones y 12 borrados
  1. 3 10
      src/jfw/front/shorturl.go
  2. 2 2
      src/jfw/front/supsearch.go
  3. 6 0
      src/jfw/front/swordfish.go

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

@@ -1174,19 +1174,12 @@ func (s *Short) NologinCommon(userId, stype, id, sid string) error {
 		s.T["logid"] = config.Seoconfig["jysskzy"].(string)
 		s.T["shareid"] = se.EncodeString(shareid)
 		//s.T["keywords"] = s.GetString("kds")
-		if stype == "" {
-			stype = "拟建,招标预告,招标公告,招标结果,招标信用信息"
-		}
-		if strings.Contains(stype, "采购意向") {
-			if len(strings.Split(stype, ",")) > 1 {
-				stype = strings.ReplaceAll(stype, "采购意向,", "")
-			} else {
-				stype = strings.ReplaceAll(stype, "采购意向", "")
-			}
-		}
 		s.DisableHttpCache()
 		po, bo, wo, obj := pcVRT(sid, industry, stype, false)
 		if obj != nil && len(obj) > 0 {
+			if obj["subtype"] == "采购意向" { //未登录不能访问采购意向
+				return s.Redirect("/notin/page")
+			}
 			if len(po) > 0 {
 				s.T["projectOther"] = po
 			}

+ 2 - 2
src/jfw/front/supsearch.go

@@ -347,8 +347,8 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 	//p353包含采购意向与拟建
 	noLoginBl := false
 	if userId == "" {
-		//未登录用户访问全部信息类型 需要过滤掉 拟建和采购意向
-		if subtype == "" {
+		//未登录用户访问全部信息类型 需要过滤掉 拟建
+		if subtype == "" || strings.Contains(subtype, "采购意向") {
 			subtype = "拟建,招标预告,招标公告,招标结果,招标信用信息"
 			noLoginBl = true
 		}

+ 6 - 0
src/jfw/front/swordfish.go

@@ -113,6 +113,12 @@ func (m *Front) PcAjaxReq() {
 	if selectType == "" {
 		selectType = "title,content"
 	}
+	if userId == "" {
+		//未登录用户访问全部信息类型 需要过滤掉 拟建和采购意向
+		if subtype == "" || subtype == "采购意向" {
+			subtype = "拟建,招标预告,招标公告,招标结果,招标信用信息"
+		}
+	}
 	industry := strings.TrimSpace(m.GetString("industry"))
 	minprice := m.GetString("minprice")               //最低价格
 	maxprice := m.GetString("maxprice")               //最高价格