sso

router.go 3.5KB

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