liuxiaolong
2019-07-03 4a2eb6f75b11ccb95e67a6f1c3b7cdf5b2c14d0c
router/router.go
@@ -38,11 +38,21 @@
   eventPushController := new(controllers.EventPushController)
   pollConfigController := new(controllers.PollConfigController)
   fileController := new(controllers.FileController)
   sysMenuController :=new(controllers.SysMenuController)
   urlPrefix := "/data/api-v" // wp 添加 路径 前缀
   userApi := r.Group(urlPrefix + "/user")
   sysApi := r.Group(urlPrefix + "/sys")
   {
      userApi.POST("/login", userController.Login)
      sysApi.POST("/login",userController.Login)
      sysApi.POST("/logout",userController.Logout)
   }
   sysMenuApi := r.Group("/sysmenus")
   {
      sysMenuApi.GET("/me",sysMenuController.Me)
   }
   userApi := r.Group(urlPrefix + "/users")
   {
      userApi.GET("/current",userController.Current)
   }
   //区域管理
@@ -61,12 +71,12 @@
      camera.PUT("/update", cameraController.CameraUpdate)
      camera.DELETE("/del/:cid", cameraController.CameraDel)
      camera.GET("/show/:cid", cameraController.CameraSel)
      camera.GET("/queryCameraAndTaskInfo", cameraController.QueryCameraAndTaskInfo)
      camera.GET("/updateSnapshotUrl/:cid",cameraController.UpdateSnapshotUrl)
      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)
@@ -200,7 +210,6 @@
   r.Static("static", "./static") // 静态文件
   //外部访问swagger.json
   r.StaticFile("/swagger.json", "./docs/swagger.json")
   fileController := new(controllers.FileController)
   vdbperson.POST("/fileupload", fileController.Fileupload)
   vdbperson.POST("/moreFileUpload", fileController.MoreFileUpload)
   r.POST(urlPrefix+"/es/ImageUploadReturnPics", fileController.ImageUploadReturnPics)