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 | 27 +++++++++++++++++++-------- 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/router/router.go b/router/router.go index ebc84f1..75c1a0f 100644 --- a/router/router.go +++ b/router/router.go @@ -38,20 +38,32 @@ eventPushController := new(controllers.EventPushController) pollConfigController := new(controllers.PollConfigController) fileController := new(controllers.FileController) + sysMenuController :=new(controllers.SysMenuController) + + + sysApi := r.Group( "/data/api-u/sys") + { + sysApi.POST("/login",userController.Login) + sysApi.POST("/logout",userController.Logout) + } + sysMenuApi := r.Group("/data/api-u/sysmenus") + { + sysMenuApi.GET("/me",sysMenuController.Me) + } + userApi := r.Group("/data/api-u/users") + { + userApi.GET("/current",userController.Current) + } urlPrefix := "/data/api-v" // wp 娣诲姞 璺緞 鍓嶇紑 - userApi := r.Group(urlPrefix + "/user") - { - userApi.POST("/login", userController.Login) - } //鍖哄煙绠$悊 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) } //鎽勫儚鏈虹鐞� @@ -62,12 +74,11 @@ camera.DELETE("/del/:cid", cameraController.CameraDel) camera.GET("/show/:cid", cameraController.CameraSel) camera.GET("/updateSnapshotUrl/:cid",cameraController.UpdateSnapshotUrl) - camera.GET("/queryCameraAndTaskInfo", cameraController.QueryCameraAndTaskInfo) camera.POST("/alltask", cameraTaskController.FindTasksByCameraIds) camera.GET("/task/:cameraId", cameraTaskController.CameraTaskAll) - camera.GET("/delTask/:cameraId/:taskId", cameraController.CameraDelTask) + camera.DELETE("/delTask/:cameraId/:taskId", cameraController.CameraDelTask) camera.POST("/saveTask", cameraController.CameraTaskSave) camera.GET("/getRulesByCameraAndTask", cameraTaskArgsController.FindByCameraAndTask) camera.GET("/getCamerasByRunType", cameraController.GetCamerasByRunType) -- Gitblit v1.8.0