zhangxinlei1996 3 жил өмнө
parent
commit
50ab9ae430

+ 10 - 4
src/jfw/front/frontRouter.go

@@ -156,15 +156,17 @@ func (this *CommonRouter) doEntpcPage() error {
 
 //大会员
 func (this *CommonRouter) BigpcIndex() error {
-	return this.doPcBigPage("")
+	return this.doPcBigPage("", "")
 }
 func (this *CommonRouter) BigpcPage(htmlPage string) error {
-	return this.doPcBigPage(htmlPage)
+	types := this.GetString("type")
+	return this.doPcBigPage(htmlPage, types)
 }
 
 var bigVipFreePageReg = regexp.MustCompile(`set_.*|free|unit_portrayal|analysis_(search|result)|pro_follow_detail`)
 
-func (this *CommonRouter) doPcBigPage(pageSign string) error {
+func (this *CommonRouter) doPcBigPage(pageSign, types string) error {
+	page := pageSign
 	userid, _ := this.GetSession("userId").(string)
 	//没有登录跳转登录页面
 	if userid == "" {
@@ -176,8 +178,8 @@ func (this *CommonRouter) doPcBigPage(pageSign string) error {
 			pageSign = array[0]
 		}
 		log.Println(bigVipFreePageReg.MatchString(pageSign), "+++", pageSign)
+		bigBaseMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
 		if !bigVipFreePageReg.MatchString(pageSign) {
-			bigBaseMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
 			if bigBaseMsg.Status <= 0 && bigBaseMsg.Vip_BuySet.Upgrade != 1 {
 				return this.Redirect("/big/page/index")
 			}
@@ -186,6 +188,10 @@ func (this *CommonRouter) doPcBigPage(pageSign string) error {
 				return this.Redirect("/big/page/index")
 			}
 		}
+		//限制超级订阅用户不能进入购买页
+		if page == "free/svip/buy" && bigBaseMsg.VipStatus > 0 && types != "upgrade" {
+			return this.Redirect("/front/subscribe.html")
+		}
 	}
 	return this.Render(fmt.Sprintf("/frontRouter/pc/page_big_pc/sess/index.html"))
 }