sso

router.go 2.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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("/login", &controllers.LoginController{}, "get:PwdLogin")
  20. beego.Router("/login/submit", &controllers.LoginController{}, "post:PwdLoginSubmit")
  21. beego.Router("/login/code", &controllers.LoginController{}, "get:CodeLogin")
  22. beego.Router("/login/code/submit", &controllers.LoginController{}, "post:CodeLoginSubmit")
  23. beego.Router("/verifytoken", &controllers.VerifyTokenController{}, "post:VerifyToken")
  24. beego.Router("/logout", &controllers.LoginController{}, "get:Logout")
  25. beego.Router("/register", &controllers.RegisterController{}, "get:Register")
  26. beego.Router("/register/submit", &controllers.RegisterController{}, "post:RegisterSubmit")
  27. beego.Router("/password/forget", &controllers.ForgetPwdController{}, "get:ForgetPassword")
  28. beego.Router("/password/modify", &controllers.ForgetPwdController{}, "post:ModifyPassword")
  29. beego.Router("/getcode", &controllers.CodeController{}, "*:Post")
  30. beego.Router("/getregistcode", &controllers.CodeController{}, "*:RegistCode")
  31. beego.Router("/org/create", &controllers.OrgController{}, "get:Create")
  32. beego.Router("/org/create/submit", &controllers.OrgController{}, "post:CreateSubmit")
  33. beego.Router("/org/app/create", &controllers.OrgController{}, "get:CreateApp")
  34. beego.Router("/org/app/create/submit", &controllers.OrgController{}, "post:CreateAppSubmit")
  35. beego.Router("/get_org_cat", &controllers.OrgCategoryController{}, "get:GetOrgCategories")
  36. beego.Router("/create_app_hint", &controllers.OrgController{}, "get:CreateAppHint")
  37. beego.Router("/province", &controllers.DistrictController{}, "get:GetProvinces")
  38. beego.Router("/city", &controllers.DistrictController{}, "get:GetCities")
  39. beego.Router("/district", &controllers.DistrictController{}, "get:GetDistricts")
  40. beego.Router("/ueditor_config", &controllers.UeditorController{}, "*:GetUeditorConfig")
  41. beego.Router("/application/qntoken", &controllers.UeditorController{}, "get:GetQNToken")
  42. beego.Get("/down/kuyicloud", func(ctx *context.Context) {
  43. url := service.GetDownUrl()
  44. ctx.Redirect(302, url)
  45. })
  46. beego.Router("/m/login/pwd", &controllers.MobileLoginController{}, "post:LoginByPwd")
  47. }