|
@@ -179,17 +179,20 @@ 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, := false, false, false
|
|
|
|
+ isEntnicheNew := 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
|
|
|
|
+ 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
|
|
}
|
|
}
|
|
s.T["isVip"] = isVip
|
|
s.T["isVip"] = isVip
|
|
s.T["isMember"] = isMember
|
|
s.T["isMember"] = isMember
|
|
s.T["isEntniche"] = isEntniche
|
|
s.T["isEntniche"] = isEntniche
|
|
|
|
+ s.T["isEntnicheNew"] = isEntnicheNew
|
|
|
|
|
|
if bm {
|
|
if bm {
|
|
//判断有没有取关,取关的话,跳转到关于剑鱼标讯页面
|
|
//判断有没有取关,取关的话,跳转到关于剑鱼标讯页面
|