瀏覽代碼

Merge branch 'dev4.6.2.18.1' into release

liumiaomiao 3 年之前
父節點
當前提交
5cabc2b02b
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      src/jfw/front/shorturl.go

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

@@ -179,13 +179,17 @@ 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
+	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
 
 	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
+		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