Browse Source

fix:企业查询增加isLogin字段

duxin 2 years ago
parent
commit
cccfa973c2
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/jfw/front/entsearch.go

+ 10 - 0
src/jfw/front/entsearch.go

@@ -37,6 +37,16 @@ func (e *Entsearch) EntSearchIndex() error {
 	if len(shareid) == 0 {
 		shareid = "10"
 	}
+	e.T["isLogin"] = 0
+	if userId, _ := e.GetSession("userId").(string); userId != "" {
+		userInfo := jy.GetVipState(e.Session(), *config.Middleground, userId)
+		e.T["isVip"] = userInfo.VipState > 0
+		e.T["isMember"] = userInfo.BigMember > 0
+		e.T["isEntniche"] = userInfo.EntMember > 0
+		e.T["isEntnicheNew"] = userInfo.IsNewEnt
+		e.T["isEntService"] = userInfo.EntService
+		e.T["isLogin"] = 1
+	}
 	e.T["shareid"] = se.EncodeString(shareid)
 	e.T["searchvalue"] = e.GetString("searchvalue")
 	e.T["logid"] = config.Seoconfig["jyzbqyss"].(string)