|
|
@@ -49,7 +49,7 @@ func bindRouter() {
|
|
|
s.BindHandler(urlPath+"/admin/welcome.html", common.Welcome)
|
|
|
s.BindHandler("/SendGM", common.GM)
|
|
|
s.BindHandler("/SendMail", common.SendMail)
|
|
|
- gmAction:=new(gm.Action)
|
|
|
+ gmAction := new(gm.Action)
|
|
|
//group.ALL("gm", gmAction)
|
|
|
s.BindHandler("/gm/downloadcdk/{ticke}", gmAction.DownloadCdk)
|
|
|
|
|
|
@@ -95,6 +95,7 @@ func bindRouter() {
|
|
|
group.GET("/game/getnoticeinfodetail/{id}", gameAction.GetNoticeInfoDetail)
|
|
|
group.ALL("/game/delnoticeinfo/{id}", gameAction.DelNoticeInfo)
|
|
|
group.GET("/game/setsilence/{id}", gameAction.SetSilence)
|
|
|
+ group.GET("/game/getserverlist", gameAction.GetServerList)
|
|
|
|
|
|
gmAction := new(gm.Action)
|
|
|
//group.ALL("/gm/sendmail", gmAction.SendMail)
|
|
|
@@ -103,31 +104,31 @@ func bindRouter() {
|
|
|
//group.GET("/gm/get/{id}", gmAction.Get)
|
|
|
//group.ALL("/gm/delete/{id}", gmAction.Delete)
|
|
|
})
|
|
|
- // 启动gtoken
|
|
|
- base.Token = >oken.GfToken{
|
|
|
- //Timeout: 10 * 1000,
|
|
|
- CacheMode: g.Config().GetInt8("gtoken.cache-mode"),
|
|
|
- MultiLogin: g.Config().GetBool("gtoken.multi-login"),
|
|
|
- LoginPath: urlPath + "/login/submit",
|
|
|
- LoginBeforeFunc: common.LoginSubmit,
|
|
|
- LogoutPath: urlPath + "/user/logout",
|
|
|
- LogoutBeforeFunc: common.LogoutBefore,
|
|
|
- AuthPaths: g.SliceStr{"/user", "/system"},
|
|
|
- GlobalMiddleware: true,
|
|
|
- AuthBeforeFunc: func(r *ghttp.Request) bool {
|
|
|
- // 静态页面不拦截
|
|
|
- if r.IsFileRequest() {
|
|
|
- return false
|
|
|
- }
|
|
|
-
|
|
|
- if strings.HasSuffix(r.URL.Path, "index") {
|
|
|
- return false
|
|
|
- }
|
|
|
-
|
|
|
- return true
|
|
|
- },
|
|
|
- }
|
|
|
- base.Token.Start()
|
|
|
+ // 启动gtoken
|
|
|
+ base.Token = >oken.GfToken{
|
|
|
+ //Timeout: 10 * 1000,
|
|
|
+ CacheMode: g.Config().GetInt8("gtoken.cache-mode"),
|
|
|
+ MultiLogin: g.Config().GetBool("gtoken.multi-login"),
|
|
|
+ LoginPath: urlPath + "/login/submit",
|
|
|
+ LoginBeforeFunc: common.LoginSubmit,
|
|
|
+ LogoutPath: urlPath + "/user/logout",
|
|
|
+ LogoutBeforeFunc: common.LogoutBefore,
|
|
|
+ AuthPaths: g.SliceStr{"/user", "/system"},
|
|
|
+ GlobalMiddleware: true,
|
|
|
+ AuthBeforeFunc: func(r *ghttp.Request) bool {
|
|
|
+ // 静态页面不拦截
|
|
|
+ if r.IsFileRequest() {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ if strings.HasSuffix(r.URL.Path, "index") {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ return true
|
|
|
+ },
|
|
|
+ }
|
|
|
+ base.Token.Start()
|
|
|
}
|
|
|
|
|
|
/*
|