|
@@ -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"))
|
|
|
+}
|