wangshan 4 лет назад
Родитель
Сommit
0bc78c5a1d
1 измененных файлов с 21 добавлено и 0 удалено
  1. 21 0
      src/jfw/front/frontRouter.go

+ 21 - 0
src/jfw/front/frontRouter.go

@@ -2,6 +2,7 @@ package front
 
 import (
 	"fmt"
+
 	"github.com/go-xweb/xweb"
 )
 
@@ -23,6 +24,10 @@ type CommonRouter struct {
 	//线上课程
 	xspcIndex xweb.Mapper `xweb:"/jyxspc/"`
 	xspcPage  xweb.Mapper `xweb:"/jyxspc/(.*)"`
+
+	//卡卷页面路由
+	couponIndex xweb.Mapper `xweb:"/swordfish/coupon/"`
+	couponPage  xweb.Mapper `xweb:"/swordfish/coupon/(.*)"`
 }
 
 func init() {
@@ -94,3 +99,19 @@ func (this *CommonRouter) XspcPage(htmlPage string) error {
 	}
 	return this.Render(fmt.Sprintf("/frontRouter/pc/xspc/sess/index.html"))
 }
+
+//卡卷
+func (this *CommonRouter) CouponIndex() error {
+	userid, _ := this.GetSession("userId").(string)
+	if userid == "" {
+		return this.Redirect("/notin/page")
+	}
+	return this.Render(fmt.Sprintf("/frontRouter/pc/coupon/sess/index.html"))
+}
+func (this *CommonRouter) CouponPage(htmlPage string) error {
+	userid, _ := this.GetSession("userId").(string)
+	if userid == "" {
+		return this.Redirect("/notin/page")
+	}
+	return this.Render(fmt.Sprintf("/frontRouter/pc/coupon/sess/index.html"))
+}