liuxiaolong
2020-08-06 dbc843d0b37f786fb816131bcc7ebca86dbe72e9
routers/router.go
@@ -9,9 +9,10 @@
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() {
@@ -39,6 +40,9 @@
   //)
   //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")
@@ -50,4 +54,8 @@
   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")
}