package aftersale import ( "zhiyuan/controllers/admin" "zhiyuan/controllers/aftersale/leader" "zhiyuan/middlewares" "github.com/gin-gonic/gin" ) func InitLeaderRouters(r *gin.Engine, router *gin.RouterGroup) { staticPath := "public/aftersale/leader/" r.Static("/aftersale/leader/static", staticPath+"static") r.StaticFile("/aftersale/leader", staticPath+"index.html") r.StaticFile("/aftersale/leader/favicon.ico", staticPath+"favicon.ico") router = router.Group("/leader") router.POST("/login", leader.Login) router.Use(middlewares.Auth("leader")) { router.GET("/statis/order", leader.StatisOrder) router.GET("/statis/comment", leader.StatisComment) router.GET("/orders", leader.OrderList) router.GET("/orders/:id", leader.OrderInfo) router.POST("/orders/:id/finish", leader.OrderFinish) router.POST("/orders/:id/confirm", leader.OrderConfirm) router.POST("/orders/:id/schedule", leader.OrderSchedule) router.POST("/orders/:id/repair", leader.OrderRepair) router.GET("/orders/:id/repair", leader.OrderRepairInfo) router.GET("/supervisors", leader.SupervisorList) router.PUT("/supervisors/:id", leader.SupervisorEdit) router.POST("/supervisors", leader.SupervisorAdd) router.GET("/params", admin.ParamList) router.GET("/params/:param", admin.ParamInfo) router.GET("/qiniu/token", admin.QiniuToken) router.GET("/info", leader.Info) router.POST("/logout", leader.Logout) router.PUT("/password", leader.Password) router.GET("/repairs", leader.RepairCheckList) router.GET("/statis/repair", leader.StatisRepair) } }