diff --git a/pkg/router/bundle.go b/pkg/router/bundle.go index 42ba7fe..9d33b00 100644 --- a/pkg/router/bundle.go +++ b/pkg/router/bundle.go @@ -10,6 +10,8 @@ import ( func BundleRouter(r *gin.RouterGroup) { bundleRoute := r.Group("bundle") bundleRoute.Use(middleware.CheckWebLogin(service.AccountProvider)) + bundleAppRoute := r.Group("bundle") + bundleAppRoute.Use(middleware.CheckLogin(service.AccountFieeProvider)) // 套餐 { bundleClientRoute := bundleRoute.Group("system") @@ -17,9 +19,10 @@ func BundleRouter(r *gin.RouterGroup) { bundleClientRoute.POST("create", bundle.CreateBundle) bundleClientRoute.POST("update", bundle.UpdateBundle) bundleClientRoute.POST("remove", bundle.DeleteBundle) + bundleClientRoute.POST("bundle-list", bundle.BundleList) } - bundleAppRoute := bundleRoute.Group("common") + bundleAppRoute = bundleAppRoute.Group("common") { bundleAppRoute.POST("bundle-list", bundle.BundleList) } diff --git a/pkg/router/router.go b/pkg/router/router.go index 0a34e19..6fb0709 100644 --- a/pkg/router/router.go +++ b/pkg/router/router.go @@ -62,7 +62,8 @@ func NewRouter() *gin.Engine { acRoute.POST("update", account.UserUpdate) //用户更新 } webAcRouter := privateGroup.Group("/user") - webAcRouter.Use(middleware.CheckWebLogin(service.AccountProvider)) + //webAcRouter.Use(middleware.CheckWebLogin(service.AccountProvider)) + webAcRouter.Use(middleware.CheckLogin(service.AccountFieeProvider)) { webAcRouter.POST("list", account.UserList) //用户列表 webAcRouter.POST("approval", account.UserApproval) //实名审核 diff --git a/pkg/router/valueAddBundle.go b/pkg/router/valueAddBundle.go index 05a1ca2..38fc255 100644 --- a/pkg/router/valueAddBundle.go +++ b/pkg/router/valueAddBundle.go @@ -12,6 +12,9 @@ func ValueAddBundleRouter(r *gin.RouterGroup) { valueAddBundleRoute := r.Group("valueAdd-bundle") valueAddBundleRoute.Use(middleware.CheckWebLogin(service.AccountProvider)) + valueAddBundleAppRoute := r.Group("valueAdd-bundle/app") + valueAddBundleAppRoute.Use(middleware.CheckLogin(service.AccountFieeProvider)) + // 增值套餐 { bundleClientRoute := valueAddBundleRoute.Group("system") @@ -21,6 +24,11 @@ func ValueAddBundleRouter(r *gin.RouterGroup) { bundleClientRoute.POST("detail", bundle.ValueAddBundleDetail) } + valueAddBundleAppRoute = valueAddBundleAppRoute.Group("system") + { + valueAddBundleAppRoute.POST("list", bundle.ValueAddBundleList) + } + } }