Browse Source

feat:PC端 未登录 列表页处理

wangshan 2 years ago
parent
commit
f823582503
2 changed files with 7 additions and 5 deletions
  1. 6 4
      src/jfw/front/shorturl.go
  2. 1 1
      src/jfw/front/swordfish.go

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

@@ -1037,11 +1037,13 @@ func SearchFilter(obj map[string]interface{}) map[string]interface{} {
 			continue
 		}
 		//中标企业信息
-		if dk == "winnerMap" && obj[dk] != nil {
+		if dk == "winnerMap" {
 			winnerNewMap := map[string]interface{}{}
-			winnerMap := util.ObjToMap(obj[dk])
-			for _, wv := range *winnerMap {
-				winnerNewMap[util.ObjToString(config.Sysconfig["detailMosaic"])] = wv
+			if obj[dk] != nil {
+				winnerMap := util.ObjToMap(obj[dk])
+				for _, wv := range *winnerMap {
+					winnerNewMap[util.ObjToString(config.Sysconfig["detailMosaic"])] = wv
+				}
 			}
 			obj[dk] = winnerNewMap
 		} else {

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

@@ -174,7 +174,7 @@ func (m *Front) PcAjaxReq() {
 				defer public.Lst.Limit()
 			}
 		}
-		if true || isLimit == 1 {
+		if isLimit == 1 {
 			searchTypeSwitch, _ := config.Sysconfig["searchTypeSwitch"].(bool)
 			so := NewSearchOptimize(userId, phone, area, city, subtype, toptype, publishtime, strings.Join(queryItems, ","), fmt.Sprintf("%s-%s", minprice, maxprice), industry, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, s_word, additionalWords, notkey, "PC", territorialization, currentPage, pageSize, searchGroup, searchMode, wordsMode, *userInfo, searchTypeSwitch, m.Request)
 			m.SetSession("selectType", so.SelectType)