|
@@ -84,7 +84,14 @@ func (this *Active) SubStatus() error {
|
|
|
if userId != "" {
|
|
|
openId, _ := this.Session().Get("s_m_openid").(string)
|
|
|
if CheckUserIsSubscribe(openId) {
|
|
|
+ //是否是vip用户
|
|
|
res["userId"] = util.SE.EncodeString(userId)
|
|
|
+ if this.GetString("pageName") == "A" {
|
|
|
+ data, ok := public.MQFW.FindById("user", userId, nil)
|
|
|
+ if ok && data != nil && *data != nil {
|
|
|
+ res["isVip"] = util.IntAll((*data)["i_vip_status"]) > 0
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
var query = map[string]interface{}{
|
|
|
"s_userid": userId,
|
|
@@ -145,6 +152,14 @@ func (this *Active) LivePage() error {
|
|
|
this.T["LIVEEND"] = true
|
|
|
return this.Render("/active/livePage/live_online_wx.html", &this.T)
|
|
|
} else if now.Unix() > config.ActiveConfig.Live_Active_Start { //直播活动进行中
|
|
|
+ if checkIsSubscribeFlag {
|
|
|
+ //是否是vip用户
|
|
|
+ userId, _ := this.Session().Get("userId").(string)
|
|
|
+ data, ok := public.MQFW.FindById("user", userId, nil)
|
|
|
+ if ok && data != nil && *data != nil {
|
|
|
+ this.T["isVip"] = util.IntAll((*data)["i_vip_status"]) > 0
|
|
|
+ }
|
|
|
+ }
|
|
|
//是否直播进行中
|
|
|
if config.ActiveConfig.Live_Ing_End > time.Now().Unix() && time.Now().Unix() > config.ActiveConfig.Live_Ing_Start {
|
|
|
this.T["LIVEING"] = true
|