...
|
...
|
@@ -3,8 +3,6 @@ package routers |
|
|
import (
|
|
|
"oppmg/controllers"
|
|
|
|
|
|
"github.com/astaxie/beego/context"
|
|
|
|
|
|
"oppmg/middleware"
|
|
|
|
|
|
"github.com/astaxie/beego"
|
...
|
...
|
@@ -119,16 +117,16 @@ func init() { |
|
|
beego.AddNamespace(nsV1)
|
|
|
beego.AddNamespace(nsAuth)
|
|
|
beego.AddNamespace(nsUcenter)
|
|
|
nsTest := beego.NewNamespace("/test",
|
|
|
beego.NSCond(func(ctx *context.Context) bool {
|
|
|
if beego.BConfig.RunMode != "prod" {
|
|
|
return true
|
|
|
}
|
|
|
return false
|
|
|
}),
|
|
|
beego.NSRouter("/te", &controllers.RbacController{}, "get:GetRoleMenuAll"),
|
|
|
)
|
|
|
beego.AddNamespace(nsTest)
|
|
|
// nsTest := beego.NewNamespace("/test",
|
|
|
// beego.NSCond(func(ctx *context.Context) bool {
|
|
|
// if beego.BConfig.RunMode != "prod" {
|
|
|
// return true
|
|
|
// }
|
|
|
// return false
|
|
|
// }),
|
|
|
// beego.NSRouter("/te", &controllers.RbacController{}, "get:GetRoleMenuAll"),
|
|
|
// )
|
|
|
// beego.AddNamespace(nsTest)
|
|
|
beego.SetStaticPath("/log", beego.AppConfig.String("log_filename"))
|
|
|
beego.SetStaticPath("/file/opp", beego.AppConfig.String("file_save_path"))
|
|
|
beego.SetStaticPath("/static", "./static")
|
...
|
...
|
|