|
@@ -11,6 +11,9 @@ type CommonRouter struct {
|
|
|
*xweb.Action
|
|
|
wxCommonPage xweb.Mapper `xweb:"/weixin/frontPage/(.*)/(sess|free)/(.*)"` //新的历时推送记录
|
|
|
pcCommonPage xweb.Mapper `xweb:"/swordfish/frontPage/(.*)/(sess|free)/(.*)"` //新的历时推送记录
|
|
|
+
|
|
|
+ integralPage xweb.Mapper `xweb:"/(swordfish|weixin)/integral/(.*)"` //积分页面路由
|
|
|
+ docsPage xweb.Mapper `xweb:"/(swordfish|weixin)/docs/(.*)"` //文库页面路由
|
|
|
}
|
|
|
|
|
|
func init() {
|
|
@@ -34,3 +37,34 @@ func (this *CommonRouter) PcCommonPage(folder, loginSign, htmlPage string) error
|
|
|
}
|
|
|
return this.Render(fmt.Sprintf("/frontRouter/pc/%s/%s/%s.html", folder, loginSign, htmlPage))
|
|
|
}
|
|
|
+
|
|
|
+//积分
|
|
|
+func (this *CommonRouter) IntegralPage(client, htmlPage string) error {
|
|
|
+ userid, _ := this.GetSession("userId").(string)
|
|
|
+ switch client {
|
|
|
+ case "weixin":
|
|
|
+ if userid == "" {
|
|
|
+ return this.Redirect("/swordfish/about")
|
|
|
+ }
|
|
|
+ return this.Render(fmt.Sprintf("/frontRouter/wx/integral/sess/%s.html", htmlPage))
|
|
|
+ case "swordfish":
|
|
|
+ if userid == "" {
|
|
|
+ return this.Redirect("/swordfish/about")
|
|
|
+ }
|
|
|
+ return this.Render(fmt.Sprintf("/frontRouter/pc/integral/sess/%s.html", htmlPage))
|
|
|
+ default:
|
|
|
+ return this.Redirect("/swordfish/about")
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+//文库
|
|
|
+func (this *CommonRouter) DocsPage(client, htmlPage string) error {
|
|
|
+ switch client {
|
|
|
+ case "weixin":
|
|
|
+ return this.Render(fmt.Sprintf("/frontRouter/wx/docs/free/%s.html", htmlPage))
|
|
|
+ case "swordfish":
|
|
|
+ return this.Render(fmt.Sprintf("/frontRouter/pc/docs/free/%s.html", htmlPage))
|
|
|
+ default:
|
|
|
+ return this.Redirect("/swordfish/about")
|
|
|
+ }
|
|
|
+}
|