liumiaomiao 3 years ago
parent
commit
d0c400b581
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/jfw/front/shorturl.go

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

@@ -179,8 +179,9 @@ func (s *Short) Article(stype, id string) error {
 		//判断用户是否是vip
 		res, _ = public.MQFW.FindById("user", userId, `{"i_vip_status":1,"i_member_status":1,"s_m_phone":1,"s_phone":1}`)
 	}
-	isVip, isMember, isEntniche := false, false, false
+
 	isEntnicheNew := false
+	isVip, isMember, isEntniche, privatedata := false, false, false, false
 
 	isVip = util.IntAll((*res)["i_vip_status"]) == 1 || util.IntAll((*res)["i_vip_status"]) == 2
 	isMember = util.IntAll((*res)["i_member_status"]) > 0
@@ -188,6 +189,10 @@ func (s *Short) Article(stype, id string) error {
 	if phone, _ := util.If(util.ObjToString((*res)["s_phone"]) != "", util.ObjToString((*res)["s_phone"]), util.ObjToString((*res)["s_m_phone"])).(string); phone != "" {
 		isEntniche = public.Mysql.CountBySql(`SELECT count(1) from entniche_user a INNER JOIN entniche_info b on (a.phone=? and a.power=1 and a.ent_id=b.id and b.status>0)`, phone) > 0
 		isEntnicheNew = public.Mysql.CountBySql(`SELECT count(1) from entniche_user a INNER JOIN entniche_info b on (a.phone=? and a.power=1 and a.ent_id=b.id and b.status>0 and b.isNew > 0)`, phone) > 0
+		privatedata = public.Mysql.CountBySql(`select count(1) from privatedata where phone = ?`, phone) > 0
+	}
+	if !isEntniche && privatedata {
+		isEntniche = true
 	}
 	s.T["isVip"] = isVip
 	s.T["isMember"] = isMember