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.

23 lines
846 B

3 years ago
  1. package system
  2. import (
  3. "gin-vue-admin/api/v1"
  4. "gin-vue-admin/middleware"
  5. "github.com/gin-gonic/gin"
  6. )
  7. type UserRouter struct {
  8. }
  9. func (s *UserRouter) InitUserRouter(Router *gin.RouterGroup) {
  10. userRouter := Router.Group("user").Use(middleware.OperationRecord())
  11. var baseApi = v1.ApiGroupApp.SystemApiGroup.BaseApi
  12. {
  13. userRouter.POST("register", baseApi.Register) // 用户注册账号
  14. userRouter.POST("changePassword", baseApi.ChangePassword) // 用户修改密码
  15. userRouter.POST("getUserList", baseApi.GetUserList) // 分页获取用户列表
  16. userRouter.POST("setUserAuthority", baseApi.SetUserAuthority) // 设置用户权限
  17. userRouter.DELETE("deleteUser", baseApi.DeleteUser) // 删除用户
  18. userRouter.PUT("setUserInfo", baseApi.SetUserInfo) // 设置用户信息
  19. }
  20. }