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.
67 lines
1.2 KiB
67 lines
1.2 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"
|
||
|
)
|
||
|
|
||
|
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{},
|
||
|
),
|
||
|
),
|
||
|
)
|
||
|
beego.AddNamespace(ns1, ns2)
|
||
|
|
||
|
//beego.SetStaticPath("/swagger/", "swagger")
|
||
|
}
|