|
@@ -9,7 +9,6 @@ import (
|
|
"net/url"
|
|
"net/url"
|
|
"qfw/util"
|
|
"qfw/util"
|
|
"qfw/util/redis"
|
|
"qfw/util/redis"
|
|
- "strconv"
|
|
|
|
"time"
|
|
"time"
|
|
|
|
|
|
"github.com/go-xweb/xweb"
|
|
"github.com/go-xweb/xweb"
|
|
@@ -64,6 +63,12 @@ func init() {
|
|
xweb.AddAction(&Subscribepay{})
|
|
xweb.AddAction(&Subscribepay{})
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+var (
|
|
|
|
+ liveActiveStartTime = config.ActiveConfig.Live_Active_Start
|
|
|
|
+ liveActiveEndTime = config.ActiveConfig.Live_Active_End
|
|
|
|
+ activeDiscount = config.ActiveConfig.ActiveDiscount
|
|
|
|
+)
|
|
|
|
+
|
|
//推送设置
|
|
//推送设置
|
|
func (s *Subscribepay) ToVIPViewPage() {
|
|
func (s *Subscribepay) ToVIPViewPage() {
|
|
myopenid := util.ObjToString(s.GetSession("s_m_openid"))
|
|
myopenid := util.ObjToString(s.GetSession("s_m_openid"))
|
|
@@ -115,11 +120,12 @@ func (s *Subscribepay) ToSetInfoTypePage() {
|
|
//订阅设置
|
|
//订阅设置
|
|
func (s *Subscribepay) ToSetPage() {
|
|
func (s *Subscribepay) ToSetPage() {
|
|
nowTime := time.Now().Unix()
|
|
nowTime := time.Now().Unix()
|
|
- startTime, _ := strconv.ParseInt(config.Seoconfig["liveActiveStartTime"].(string), 10, 64)
|
|
|
|
- endTime, _ := strconv.ParseInt(config.Seoconfig["liveActiveEndTime"].(string), 10, 64)
|
|
|
|
- if nowTime >= startTime && nowTime < endTime {
|
|
|
|
|
|
+ if nowTime >= liveActiveStartTime && nowTime < liveActiveEndTime {
|
|
s.T["isLiveActive"] = true
|
|
s.T["isLiveActive"] = true
|
|
}
|
|
}
|
|
|
|
+ s.T["liveActiveStartTime"] = liveActiveStartTime
|
|
|
|
+ s.T["liveActiveEndTime"] = liveActiveEndTime
|
|
|
|
+ s.T["activeDiscount"] = activeDiscount
|
|
myopenid := util.ObjToString(s.GetSession("s_m_openid"))
|
|
myopenid := util.ObjToString(s.GetSession("s_m_openid"))
|
|
mynickname, _ := s.Session().Get("s_nickname").(string)
|
|
mynickname, _ := s.Session().Get("s_nickname").(string)
|
|
myavatar, _ := s.Session().Get("s_avatar").(string)
|
|
myavatar, _ := s.Session().Get("s_avatar").(string)
|
|
@@ -185,9 +191,7 @@ func (s *Subscribepay) Introduce() error {
|
|
return s.Redirect("/swordfish/about")
|
|
return s.Redirect("/swordfish/about")
|
|
}
|
|
}
|
|
nowTime := time.Now().Unix()
|
|
nowTime := time.Now().Unix()
|
|
- startTime, _ := strconv.ParseInt(config.Seoconfig["liveActiveStartTime"].(string), 10, 64)
|
|
|
|
- endTime, _ := strconv.ParseInt(config.Seoconfig["liveActiveEndTime"].(string), 10, 64)
|
|
|
|
- if nowTime >= startTime && nowTime < endTime {
|
|
|
|
|
|
+ if nowTime >= liveActiveStartTime && nowTime < liveActiveEndTime {
|
|
s.T["isLiveActive"] = true
|
|
s.T["isLiveActive"] = true
|
|
}
|
|
}
|
|
obj := util.ObjToMap((*m)["o_vipjy"])
|
|
obj := util.ObjToMap((*m)["o_vipjy"])
|
|
@@ -223,14 +227,15 @@ func (s *Subscribepay) TrialInfo() error {
|
|
func (s *Subscribepay) ToPurchasePage(flag string) {
|
|
func (s *Subscribepay) ToPurchasePage(flag string) {
|
|
//直播活动
|
|
//直播活动
|
|
nowTime := time.Now().Unix()
|
|
nowTime := time.Now().Unix()
|
|
- startTime, _ := strconv.ParseInt(config.Seoconfig["liveActiveStartTime"].(string), 10, 64)
|
|
|
|
- endTime, _ := strconv.ParseInt(config.Seoconfig["liveActiveEndTime"].(string), 10, 64)
|
|
|
|
- if nowTime >= startTime && nowTime < endTime {
|
|
|
|
|
|
+ if nowTime >= liveActiveStartTime && nowTime < liveActiveEndTime {
|
|
s.T["isLiveActive"] = true
|
|
s.T["isLiveActive"] = true
|
|
//虚拟人数
|
|
//虚拟人数
|
|
buyCount := redis.Get("other", "liveactiveRTB")
|
|
buyCount := redis.Get("other", "liveactiveRTB")
|
|
s.T["buyCount"] = buyCount
|
|
s.T["buyCount"] = buyCount
|
|
}
|
|
}
|
|
|
|
+ s.T["liveActiveStartTime"] = liveActiveStartTime
|
|
|
|
+ s.T["liveActiveEndTime"] = liveActiveEndTime
|
|
|
|
+ s.T["activeDiscount"] = activeDiscount
|
|
if flag == "trial" { //试用
|
|
if flag == "trial" { //试用
|
|
s.T["isTrial"] = true
|
|
s.T["isTrial"] = true
|
|
s.T["orderType"] = -1
|
|
s.T["orderType"] = -1
|
|
@@ -270,6 +275,9 @@ func (s *Subscribepay) ToPaySuccessPage() {
|
|
//订阅收费支付订单详情页面
|
|
//订阅收费支付订单详情页面
|
|
func (s *Subscribepay) ToOrderDetailPage() {
|
|
func (s *Subscribepay) ToOrderDetailPage() {
|
|
s.T["signature"] = wx.SignJSSDK(s.Site() + s.Url()) //微信支付准备参数
|
|
s.T["signature"] = wx.SignJSSDK(s.Site() + s.Url()) //微信支付准备参数
|
|
|
|
+ s.T["liveActiveStartTime"] = liveActiveStartTime
|
|
|
|
+ s.T["liveActiveEndTime"] = liveActiveEndTime
|
|
|
|
+ s.T["activeDiscount"] = activeDiscount
|
|
s.Render("/weixin/vipsubscribe/vip_order_detail.html")
|
|
s.Render("/weixin/vipsubscribe/vip_order_detail.html")
|
|
}
|
|
}
|
|
|
|
|