| 12345678910111213141516171819202122232425262728 |
- /*
- * @desc:后台路由
- * @company:云南奇讯科技有限公司
- * @Author: yixiaohu
- * @Date: 2022/2/18 17:34
- */
- package router
- import (
- "github.com/gogf/gf/v2/net/ghttp"
- "github.com/gogf/gf/v2/os/gctx"
- commonService "github.com/tiger1103/gfast/v3/internal/app/common/service"
- "github.com/tiger1103/gfast/v3/internal/app/system/controller"
- "github.com/tiger1103/gfast/v3/internal/app/system/service"
- )
- func BindController(group *ghttp.RouterGroup) {
- group.Group("/system", func(group *ghttp.RouterGroup) {
- group.Middleware(commonService.Middleware().MiddlewareCORS)
- //context拦截器
- group.Middleware(service.Middleware().Ctx, service.Middleware().Auth)
- service.GfToken(gctx.New()).Middleware(group)
- group.Bind(
- controller.User,
- )
- })
- }
|