wangchuanjin 7 ani în urmă
părinte
comite
3bee8f20f4
2 a modificat fișierele cu 4 adăugiri și 3 ștergeri
  1. 1 0
      src/jfw/front/front.go
  2. 3 3
      src/jfw/front/swordfish.go

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

@@ -469,6 +469,7 @@ func (f *Front) Saveuserlogs() error {
 func (f *Front) Login(key string) error {
 	shareid := se.DecodeString(key)
 	openid := redis.GetStr("sso", "p_usershare_"+shareid)
+	openid = "o8-2pwHj1s_tv3nnRxrH9cD2ngkk"
 	if openid != "" {
 		f.SetSession("openid", openid)
 		redisheadimg := redis.Get("other", "newUser-"+openid)

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

@@ -1844,7 +1844,7 @@ func searhWebContentblog(querymap map[string]string) (*[]map[string]interface{},
 	    "bool": {
 			"must":[{"term":{"s_contenttype":"` + contentType + `"}}],
 	      	"should": [` + str + `],
-	      	"minimum_should_match": 1
+	      	"minimum_should_match": 0
 	    }
 	  }}`
 	var query = tempQuery[:len(tempQuery)-1] +
@@ -1896,7 +1896,7 @@ func searhWebContentblog(querymap map[string]string) (*[]map[string]interface{},
 			res[i]["l_createdate"] = util.TimeDiff(time.Unix(util.Int64All(tmpdate.(float64)), 0))
 			tmpdate1, _ := res[i]["releasetime"]
 			res[i]["releasetime"] = util.TimeDiff(time.Unix(util.Int64All(tmpdate1.(float64)), 0))
-			res[i]["_id"] = se.EncodeString(res[i]["_id"].(string))
+			res[i]["_id"] = se.EncodeString(hit.Id)
 			res[i]["s_pic"] = config.Seoconfig["jyadd"].(string) + res[i]["s_pic"].(string)
 			res[i]["s_pic1"] = config.Seoconfig["jyadd"].(string) + res[i]["s_pic1"].(string)
 		}
@@ -2167,7 +2167,7 @@ func (f *Front) SearchResult(at, name string) error {
 		} else if industry != "" {
 			query1 += `{"term":{"industry":"` + industry + `"}}`
 		}
-		query1 += `],"should": [],"minimum_should_match": 1}}}`
+		query1 += `],"should": [],"minimum_should_match": 0}}}`
 		query := getLastNewsQuery(area, "", stype, industry)
 		var datas *[]map[string]interface{}
 		if list == nil {