|
@@ -179,13 +179,17 @@ func (s *Short) Article(stype, id string) error {
|
|
//判断用户是否是vip
|
|
//判断用户是否是vip
|
|
res, _ = public.MQFW.FindById("user", userId, `{"i_vip_status":1,"i_member_status":1,"s_m_phone":1,"s_phone":1}`)
|
|
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
|
|
isVip = util.IntAll((*res)["i_vip_status"]) == 1 || util.IntAll((*res)["i_vip_status"]) == 2
|
|
isMember = util.IntAll((*res)["i_member_status"]) > 0
|
|
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 != "" {
|
|
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
|
|
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["isVip"] = isVip
|
|
s.T["isMember"] = isMember
|
|
s.T["isMember"] = isMember
|