diff --git a/.gitignore b/.gitignore index 9a8f686..20db31c 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ nginx.conf /tmp/* .idea/* /.idea/modules.xml +/static/upload/ diff --git a/app/router/router.go b/app/router/router.go index 7eff844..4047177 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -81,10 +81,11 @@ func route(r *gin.RouterGroup) { } func rComm(r *gin.RouterGroup) { - r.StaticFS("/upload", http.Dir("./static/upload")) - r.POST("/uploadFile", hdl.UploadFile) // 上传文件 r.GET("/getBaseInfo", hdl.GetBaseInfo) // 获取系统信息 - r.POST("/getMenuList", hdl.MenuList) // 获取菜单栏列表 +d r.StaticFS("/upload", http.Dir("./static/upload")) + r.Use(mw.CheckPermission) // 检测权限 + r.POST("/uploadFile", hdl.UploadFile) // 上传文件 + r.POST("/getMenuList", hdl.MenuList) // 获取菜单栏列表 } func rSetCenter(r *gin.RouterGroup) { diff --git a/static/upload/0.png b/static/upload/0.png deleted file mode 100644 index 3210c5b..0000000 Binary files a/static/upload/0.png and /dev/null differ diff --git a/static/upload/111 - 副本.jpg b/static/upload/111 - 副本.jpg deleted file mode 100644 index 36b7910..0000000 Binary files a/static/upload/111 - 副本.jpg and /dev/null differ