|
@@ -2,13 +2,12 @@ package front
|
|
|
|
|
|
import (
|
|
|
"fmt"
|
|
|
+ "github.com/go-xweb/xweb"
|
|
|
"jfw/config"
|
|
|
"jfw/public"
|
|
|
"qfw/util/jy"
|
|
|
"regexp"
|
|
|
"strings"
|
|
|
-
|
|
|
- "github.com/go-xweb/xweb"
|
|
|
)
|
|
|
|
|
|
//前端通用路由
|
|
@@ -156,7 +155,7 @@ func (this *CommonRouter) BigpcPage(htmlPage string) error {
|
|
|
return this.doPcBigPage(htmlPage)
|
|
|
}
|
|
|
|
|
|
-var bigVipFreePageReg = regexp.MustCompile(`set_*|free_*`)
|
|
|
+var bigVipFreePageReg = regexp.MustCompile(`set_*|free_*|ent_portrait`)
|
|
|
|
|
|
func (this *CommonRouter) doPcBigPage(pageSign string) error {
|
|
|
userid, _ := this.GetSession("userId").(string)
|
|
@@ -165,19 +164,17 @@ func (this *CommonRouter) doPcBigPage(pageSign string) error {
|
|
|
return this.Redirect("/notin/page")
|
|
|
}
|
|
|
//没有购买大会员跳转大会员介绍页
|
|
|
- bigBaseMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
|
|
|
- if bigBaseMsg.Status <= 0 && !bigBaseMsg.Viper {
|
|
|
- return this.Redirect("/big/page/index")
|
|
|
+ if array := strings.Split(pageSign, "/"); len(array) > 0 {
|
|
|
+ pageSign = array[0]
|
|
|
}
|
|
|
- //大会员页面权限判断
|
|
|
- if pageSign != "" {
|
|
|
- if array := strings.Split(pageSign, "/"); len(array) > 0 {
|
|
|
- pageSign = array[0]
|
|
|
+ if !bigVipFreePageReg.MatchString(pageSign) {
|
|
|
+ bigBaseMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
|
|
|
+ if bigBaseMsg.Status <= 0 && !bigBaseMsg.Viper {
|
|
|
+ return this.Redirect("/big/page/index")
|
|
|
}
|
|
|
- if !bigVipFreePageReg.MatchString(pageSign) {
|
|
|
- if !bigBaseMsg.CheckBigVipFrontPower(pageSign) {
|
|
|
- return this.Redirect("/big/page/index")
|
|
|
- }
|
|
|
+ //大会员页面权限判断
|
|
|
+ if !bigBaseMsg.CheckBigVipFrontPower(pageSign) {
|
|
|
+ return this.Redirect("/big/page/index")
|
|
|
}
|
|
|
}
|
|
|
return this.Render(fmt.Sprintf("/frontRouter/pc/page_big_pc/sess/index.html"))
|