fuwencai 2 vuotta sitten
vanhempi
commit
1d183e067c
2 muutettua tiedostoa jossa 6 lisäystä ja 15 poistoa
  1. 2 2
      src/jfw/front/pcIndex.go
  2. 4 13
      src/jfw/front/tags.go

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

@@ -383,7 +383,7 @@ func (f *PcIndex) SearchResult(at, name string) error {
 	userId := util.ObjToString(f.GetSession("userId"))
 	// p397 未登录收回查看拟建项目权限
 	// 如果用户未登录访问拟建项目 重定向到登录页面
-	if userId == "" && strings.Contains(name, "NJ") {
+	if userId == "" && name == "NJXM" {
 		return f.Redirect("/notin/page")
 	}
 	var no = 5
@@ -546,7 +546,6 @@ func (f *PcIndex) SearchResult(at, name string) error {
 			// p397 未登录用户收回拟建权限
 			stype = "招标,询价,竞谈,变更,单一,竞价,邀标,成交,中标,废标,流标,结果变更,合同,验收,违规,预告,需求公示,预审,论证意见,预审结果"
 		}
-
 		var datas *[]map[string]interface{}
 		if list == nil || len(list.([]interface{})) == 0 {
 			if keywords == "" {
@@ -572,6 +571,7 @@ func (f *PcIndex) SearchResult(at, name string) error {
 				}
 			}
 			timeout := util.IntAllDef(config.Sysconfig["pcIndexHotCacheTime"], 7200)
+			// todo 登录和未登录用不用分开存缓存
 			redis.Put("other", "classify_"+name, datas, timeout)
 		} else {
 			b, _ := json.Marshal(list)

+ 4 - 13
src/jfw/front/tags.go

@@ -122,12 +122,7 @@ func (this *Tags) Index(types, name string) {
 		checkedIndustry = ""
 	}
 	filters["area"] = this.T["area"]
-	var isLogin bool
-	userId := qu.ObjToString(this.GetSession("userId"))
-	if userId != "" {
-		isLogin = true
-	}
-	InfoType, filterInfoType := this.GetInfoType(checkedInfoType, isLogin)
+	InfoType, filterInfoType := this.GetInfoType(checkedInfoType)
 	infotypeStr := ""
 	if checkedInfoType != "all" {
 		filters["stype"] = filterInfoType
@@ -767,14 +762,10 @@ func (this *Tags) GetInsturyKeywords(idstr string) (name, class_1, class_2 strin
 
 // 获取信息类型 【全部是虚假的全部、实则是不包含拟建和采购意向的全部】
 // p353包含采购意向与拟建
-// p397 未登录不包含拟建 登录用户保持原状
-func (this *Tags) GetInfoType(idstr string, isLogin bool) (string, string) {
+// p397 不包含拟建
+func (this *Tags) GetInfoType(idstr string) (string, string) {
 	if idstr == "all" {
-		if isLogin {
-			return "拟建,招标,邀标,询价,竞谈,单一,竞价,变更,中标,成交,废标,流标,合同,验收,违规,预告,需求公示,预审,论证意见,预审结果", ""
-		} else {
-			return "招标,邀标,询价,竞谈,单一,竞价,变更,中标,成交,废标,流标,合同,验收,违规,预告,需求公示,预审,论证意见,预审结果", ""
-		}
+		return "招标,邀标,询价,竞谈,单一,竞价,变更,中标,成交,废标,流标,合同,验收,违规,预告,需求公示,预审,论证意见,预审结果", ""
 		//return "", ""
 	}
 	id, _ := strconv.Atoi(idstr)