| | |
| | | |
| | | import ( |
| | | "car-service/controllers" |
| | | "github.com/astaxie/beego/plugins/cors" |
| | | |
| | | "car-service/extend/util" |
| | | "fmt" |
| | | "github.com/astaxie/beego" |
| | | "github.com/astaxie/beego/plugins/cors" |
| | | ) |
| | | |
| | | func init() { |
| | |
| | | //) |
| | | //beego.AddNamespace(ns) |
| | | //beego.Router("/basic/api/car/app/user", &controllers.UserController{}) |
| | | rootPath := util.GetAppRootPath() |
| | | fmt.Println("rootPath:", rootPath) |
| | | beego.SetStaticPath("/download", rootPath+"/download") |
| | | preApi := "/basic/api" |
| | | beego.Router(preApi+"/car/statistic", &controllers.CarController{}, "*:Statistic") |
| | | beego.Router(preApi+"/car/spaceNo", &controllers.CarController{}, "*:SpaceNo") |
| | |
| | | beego.Router(preApi+"/user/logout", &controllers.UserController{}, "*:Logout") |
| | | beego.Router(preApi+"/user/addPlateNo", &controllers.UserController{}, "*:AddPlateNo") |
| | | beego.Router(preApi+"/user/myPlateNos", &controllers.UserController{}, "*:MyPlateNos") |
| | | beego.Router(preApi+"/user/delPlateNo", &controllers.UserController{}, "*:DelPlateNo") |
| | | |
| | | beego.Router(preApi+"/user/all", &controllers.UserController{}, "*:GetUserAll") |
| | | |
| | | beego.Router(preApi+"/car/crossRecord", &controllers.CarController{}, "*:CrossRecord") |
| | | } |