From d21de749cc7028a802ec413f47e866b1e13f033e Mon Sep 17 00:00:00 2001 From: liuxiaolong <736321739@qq.com> Date: 星期四, 04 七月 2019 11:51:42 +0800 Subject: [PATCH] fix bug --- router/router.go | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/router/router.go b/router/router.go index 103fa46..75c1a0f 100644 --- a/router/router.go +++ b/router/router.go @@ -40,28 +40,30 @@ fileController := new(controllers.FileController) sysMenuController :=new(controllers.SysMenuController) - urlPrefix := "/data/api-v" // wp 娣诲姞 璺緞 鍓嶇紑 - sysApi := r.Group(urlPrefix + "/sys") + + sysApi := r.Group( "/data/api-u/sys") { sysApi.POST("/login",userController.Login) sysApi.POST("/logout",userController.Logout) } - sysMenuApi := r.Group("/sysmenus") + sysMenuApi := r.Group("/data/api-u/sysmenus") { sysMenuApi.GET("/me",sysMenuController.Me) } - userApi := r.Group(urlPrefix + "/users") + userApi := r.Group("/data/api-u/users") { userApi.GET("/current",userController.Current) } + + urlPrefix := "/data/api-v" // wp 娣诲姞 璺緞 鍓嶇紑 //鍖哄煙绠$悊 area := r.Group(urlPrefix + "/area") { area.GET("/localmenu", areaController.CameraTree) area.POST("/add", areaController.AreaAdd) - area.GET("/del", areaController.AreaDelete) - area.PUT("/update/:id", areaController.AreaUpdate) + area.POST("/del", areaController.AreaDelete) + area.POST("/update", areaController.AreaUpdate) } //鎽勫儚鏈虹鐞� -- Gitblit v1.8.0