diff --git a/template/router.template b/template/router.template index 16cb45a9..010bb03e 100644 --- a/template/router.template +++ b/template/router.template @@ -60,7 +60,7 @@ func InitBusinessRouter(r *gin.Engine, authMiddleware *jwt.GinJWTMiddleware) *gi // noCheckRoleRouter 无需认证的路由 func noCheckRoleRouter(r *gin.Engine) { // 可根据业务需求来设置接口版本 - v := r.Group("") + v := r.Group("/api/v1") for _, f := range routerNoCheckRole { f(v) @@ -70,7 +70,7 @@ func noCheckRoleRouter(r *gin.Engine) { // checkRoleRouter 需要认证的路由 func checkRoleRouter(r *gin.Engine, authMiddleware *jwtauth.GinJWTMiddleware) { // 可根据业务需求来设置接口版本 - v := r.Group("") + v := r.Group("/api/v1") for _, f := range routerCheckRole { f(v, authMiddleware)