|
@@ -8,6 +8,7 @@ import (
|
|
"jfw/wx"
|
|
"jfw/wx"
|
|
"net/url"
|
|
"net/url"
|
|
"qfw/util"
|
|
"qfw/util"
|
|
|
|
+ "strconv"
|
|
"time"
|
|
"time"
|
|
|
|
|
|
"github.com/go-xweb/xweb"
|
|
"github.com/go-xweb/xweb"
|
|
@@ -112,6 +113,12 @@ func (s *Subscribepay) ToSetInfoTypePage() {
|
|
|
|
|
|
//订阅设置
|
|
//订阅设置
|
|
func (s *Subscribepay) ToSetPage() {
|
|
func (s *Subscribepay) ToSetPage() {
|
|
|
|
+ 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 {
|
|
|
|
+ s.T["isLiveActive"] = true
|
|
|
|
+ }
|
|
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)
|
|
@@ -176,6 +183,12 @@ func (s *Subscribepay) Introduce() error {
|
|
if !ok {
|
|
if !ok {
|
|
return s.Redirect("/swordfish/about")
|
|
return s.Redirect("/swordfish/about")
|
|
}
|
|
}
|
|
|
|
+ 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 {
|
|
|
|
+ s.T["isLiveActive"] = true
|
|
|
|
+ }
|
|
obj := util.ObjToMap((*m)["o_vipjy"])
|
|
obj := util.ObjToMap((*m)["o_vipjy"])
|
|
if util.IntAll((*m)["i_vip_status"]) > 0 {
|
|
if util.IntAll((*m)["i_vip_status"]) > 0 {
|
|
return s.Redirect("/weixin/pay/toSubVipSetPage")
|
|
return s.Redirect("/weixin/pay/toSubVipSetPage")
|
|
@@ -203,6 +216,16 @@ func (s *Subscribepay) TrialInfo() error {
|
|
|
|
|
|
//订阅收费购买页面
|
|
//订阅收费购买页面
|
|
func (s *Subscribepay) ToPurchasePage(flag string) {
|
|
func (s *Subscribepay) ToPurchasePage(flag string) {
|
|
|
|
+ //直播活动
|
|
|
|
+ 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 {
|
|
|
|
+ s.T["isLiveActive"] = true
|
|
|
|
+ //虚拟人数
|
|
|
|
+ buyCount := (nowTime - startTime) / 13
|
|
|
|
+ s.T["buyCount"] = buyCount
|
|
|
|
+ }
|
|
if flag == "trial" { //试用
|
|
if flag == "trial" { //试用
|
|
s.T["isTrial"] = true
|
|
s.T["isTrial"] = true
|
|
s.T["orderType"] = -1
|
|
s.T["orderType"] = -1
|