You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.4 KiB

2 years ago
// @APIVersion 1.0.0
// @Title VIVIB API
// @Description VIVIB管理系统API
// @TermsOfServiceUrl https://www.yixiang.co/
package routers
import (
beego "github.com/beego/beego/v2/server/web"
"viviman.top/controllers/admin"
2 years ago
"viviman.top/controllers/vivib"
2 years ago
)
func init() {
//移动端路由
ns1 := beego.NewNamespace("/v1",
beego.NSNamespace("/mem",
beego.NSInclude(),
),
)
//管理后台路由
ns2 := beego.NewNamespace("/admin",
beego.NSNamespace("/auth",
beego.NSInclude(
&admin.LoginController{},
),
),
beego.NSNamespace("/user",
beego.NSInclude(
&admin.UserController{},
),
),
beego.NSNamespace("/menu",
beego.NSInclude(
&admin.MenuController{},
),
),
beego.NSNamespace("/dict",
beego.NSInclude(
&admin.DictController{},
),
),
beego.NSNamespace("/dictDetail",
beego.NSInclude(
&admin.DictDetailController{},
),
),
beego.NSNamespace("/dept",
beego.NSInclude(
&admin.DeptController{},
),
),
beego.NSNamespace("/job",
beego.NSInclude(
&admin.JobController{},
),
),
beego.NSNamespace("/roles",
beego.NSInclude(
&admin.RoleController{},
),
),
)
2 years ago
//财务管理后台路由
ns3 := beego.NewNamespace("/vivib",
beego.NSNamespace("/licai",
beego.NSInclude(
&vivib.LiCaiController{},
),
),
)
beego.AddNamespace(ns1, ns2, ns3)
2 years ago
//beego.SetStaticPath("/swagger/", "swagger")
}