sso

router.go 3.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. package routers
  2. import (
  3. "SSO/controllers"
  4. "SSO/service"
  5. "github.com/astaxie/beego"
  6. "github.com/astaxie/beego/context"
  7. )
  8. func init() {
  9. // var filter = func(ctx *context.Context) {
  10. // utils.TraceLog("current session id: %v", ctx.Input.CruSession.SessionID())
  11. // }
  12. // beego.InsertFilter("/*", beego.BeforeExec, filter)
  13. beego.ErrorController(&controllers.ErrorController{})
  14. beego.Router("/", &controllers.IndexController{}, "get:Index")
  15. beego.Router("/scrm", &controllers.IndexController{}, "get:SCRMIndex")
  16. beego.Router("/mmall", &controllers.IndexController{}, "get:MircoMallIndex")
  17. beego.Router("/xt", &controllers.IndexController{}, "get:XTIndex")
  18. beego.Router("/cdm", &controllers.IndexController{}, "get:CDMIndex")
  19. beego.Router("/about", &controllers.IndexController{}, "get:AboutUs")
  20. beego.Router("/help", &controllers.IndexController{}, "get:Help")
  21. beego.Router("/login", &controllers.LoginController{}, "get:PwdLogin")
  22. beego.Router("/login/submit", &controllers.LoginController{}, "post:PwdLoginSubmit")
  23. beego.Router("/login/code", &controllers.LoginController{}, "get:CodeLogin")
  24. beego.Router("/login/code/submit", &controllers.LoginController{}, "post:CodeLoginSubmit")
  25. beego.Router("/verifytoken", &controllers.VerifyTokenController{}, "post:VerifyToken")
  26. beego.Router("/logout", &controllers.LoginController{}, "get:Logout")
  27. beego.Router("/register", &controllers.RegisterController{}, "get:Register")
  28. beego.Router("/register/submit", &controllers.RegisterController{}, "post:RegisterSubmit")
  29. beego.Router("/password/forget", &controllers.ForgetPwdController{}, "get:ForgetPassword")
  30. beego.Router("/password/modify", &controllers.ForgetPwdController{}, "post:ModifyPassword")
  31. beego.Router("/getcode", &controllers.CodeController{}, "*:Post")
  32. beego.Router("/getregistcode", &controllers.CodeController{}, "*:RegistCode")
  33. beego.Router("/org/create", &controllers.OrgController{}, "get:c")
  34. beego.Router("/org/create/submit", &controllers.OrgController{}, "post:CreateSubmit")
  35. beego.Router("/org/admin/apps", &controllers.OrgController{}, "get:ViewApps")
  36. beego.Router("/org/app/create", &controllers.OrgController{}, "get:CreateApp")
  37. // beego.Router("/org/app/create/submit", &controllers.OrgController{}, "post:CreateAppSubmit")
  38. beego.Router("/app/open", &controllers.OrgController{}, "post:OpenAppSubmit")
  39. beego.Router("/get_org_cat", &controllers.OrgCategoryController{}, "get:GetOrgCategories")
  40. beego.Router("/create_app_hint", &controllers.OrgController{}, "get:CreateAppHint")
  41. beego.Router("/province", &controllers.DistrictController{}, "get:GetProvinces")
  42. beego.Router("/city", &controllers.DistrictController{}, "get:GetCities")
  43. beego.Router("/district", &controllers.DistrictController{}, "get:GetDistricts")
  44. beego.Router("/ueditor_config", &controllers.UeditorController{}, "*:GetUeditorConfig")
  45. beego.Router("/application/qntoken", &controllers.UeditorController{}, "get:GetQNToken")
  46. beego.Get("/down/kuyicloud", func(ctx *context.Context) {
  47. url := service.GetDownUrl()
  48. ctx.Redirect(302, url)
  49. })
  50. beego.Router("/m/login/pwd", &controllers.MobileLoginController{}, "post:LoginByPwd")
  51. beego.Router("/mobile/regist", &controllers.MobileRegistController{}, "get:Register")
  52. beego.Router("/mobile/regist/submit", &controllers.MobileRegistController{}, "post:RegistSubmit")
  53. beego.Router("/mobile/org/create", &controllers.MobileRegistController{}, "get:CreateOrg")
  54. beego.Router("/mobile/org/create/submit", &controllers.MobileRegistController{}, "post:CreateOrgSubmit")
  55. beego.Router("/mobile/finish", &controllers.MobileRegistController{}, "get:Finish")
  56. }