package routers import ( "SSO/controllers" "SSO/service" "github.com/astaxie/beego" "github.com/astaxie/beego/context" ) func init() { // var filter = func(ctx *context.Context) { // utils.TraceLog("current session id: %v", ctx.Input.CruSession.SessionID()) // } // beego.InsertFilter("/*", beego.BeforeExec, filter) beego.ErrorController(&controllers.ErrorController{}) beego.Router("/", &controllers.IndexController{}, "get:Index") beego.Router("/scrm", &controllers.IndexController{}, "get:SCRMIndex") beego.Router("/mmall", &controllers.IndexController{}, "get:MircoMallIndex") beego.Router("/xt", &controllers.IndexController{}, "get:XTIndex") beego.Router("/cdm", &controllers.IndexController{}, "get:CDMIndex") beego.Router("/about", &controllers.IndexController{}, "get:AboutUs") beego.Router("/help", &controllers.IndexController{}, "get:Help") beego.Router("/login", &controllers.LoginController{}, "get:PwdLogin") beego.Router("/login/submit", &controllers.LoginController{}, "post:PwdLoginSubmit") beego.Router("/login/code", &controllers.LoginController{}, "get:CodeLogin") beego.Router("/login/code/submit", &controllers.LoginController{}, "post:CodeLoginSubmit") beego.Router("/verifytoken", &controllers.VerifyTokenController{}, "post:VerifyToken") beego.Router("/logout", &controllers.LoginController{}, "get:Logout") beego.Router("/register", &controllers.RegisterController{}, "get:Register") beego.Router("/register/submit", &controllers.RegisterController{}, "post:RegisterSubmit") beego.Router("/password/forget", &controllers.ForgetPwdController{}, "get:ForgetPassword") beego.Router("/password/modify", &controllers.ForgetPwdController{}, "post:ModifyPassword") beego.Router("/getcode", &controllers.CodeController{}, "*:Post") beego.Router("/getregistcode", &controllers.CodeController{}, "*:RegistCode") beego.Router("/org/create", &controllers.OrgController{}, "get:c") beego.Router("/org/create/submit", &controllers.OrgController{}, "post:CreateSubmit") beego.Router("/org/admin/apps", &controllers.OrgController{}, "get:ViewApps") beego.Router("/org/app/create", &controllers.OrgController{}, "get:CreateApp") // beego.Router("/org/app/create/submit", &controllers.OrgController{}, "post:CreateAppSubmit") beego.Router("/app/open", &controllers.OrgController{}, "post:OpenAppSubmit") beego.Router("/get_org_cat", &controllers.OrgCategoryController{}, "get:GetOrgCategories") beego.Router("/create_app_hint", &controllers.OrgController{}, "get:CreateAppHint") beego.Router("/province", &controllers.DistrictController{}, "get:GetProvinces") beego.Router("/city", &controllers.DistrictController{}, "get:GetCities") beego.Router("/district", &controllers.DistrictController{}, "get:GetDistricts") beego.Router("/ueditor_config", &controllers.UeditorController{}, "*:GetUeditorConfig") beego.Router("/application/qntoken", &controllers.UeditorController{}, "get:GetQNToken") beego.Get("/down/kuyicloud", func(ctx *context.Context) { url := service.GetDownUrl() ctx.Redirect(302, url) }) beego.Router("/m/login/pwd", &controllers.MobileLoginController{}, "post:LoginByPwd") beego.Router("/mobile/regist", &controllers.MobileRegistController{}, "get:Register") beego.Router("/mobile/regist/submit", &controllers.MobileRegistController{}, "post:RegistSubmit") beego.Router("/mobile/org/create", &controllers.MobileRegistController{}, "get:CreateOrg") beego.Router("/mobile/org/create/submit", &controllers.MobileRegistController{}, "post:CreateOrgSubmit") beego.Router("/mobile/finish", &controllers.MobileRegistController{}, "get:Finish") }