sso

router.go 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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/admin/apps", &controllers.OrgController{}, "get:ViewApps")
  34. beego.Router("/org/app/create", &controllers.OrgController{}, "get:CreateApp")
  35. // beego.Router("/org/app/create/submit", &controllers.OrgController{}, "post:CreateAppSubmit")
  36. beego.Router("/app/open", &controllers.OrgController{}, "post:OpenAppSubmit")
  37. beego.Router("/get_org_cat", &controllers.OrgCategoryController{}, "get:GetOrgCategories")
  38. beego.Router("/create_app_hint", &controllers.OrgController{}, "get:CreateAppHint")
  39. beego.Router("/province", &controllers.DistrictController{}, "get:GetProvinces")
  40. beego.Router("/city", &controllers.DistrictController{}, "get:GetCities")
  41. beego.Router("/district", &controllers.DistrictController{}, "get:GetDistricts")
  42. beego.Router("/ueditor_config", &controllers.UeditorController{}, "*:GetUeditorConfig")
  43. beego.Router("/application/qntoken", &controllers.UeditorController{}, "get:GetQNToken")
  44. beego.Get("/down/kuyicloud", func(ctx *context.Context) {
  45. url := service.GetDownUrl()
  46. ctx.Redirect(302, url)
  47. })
  48. beego.Router("/m/login/pwd", &controllers.MobileLoginController{}, "post:LoginByPwd")
  49. }