From 6ecda400e04a118326cabe768f8808e9b5514af6 Mon Sep 17 00:00:00 2001 From: liuxiaolong <liuxiaolong@aiotlink.com> Date: 星期三, 05 八月 2020 19:46:35 +0800 Subject: [PATCH] set 90 spaceNum,limit <=5 push msg --- routers/router.go | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/routers/router.go b/routers/router.go index 0cbf2f0..172f308 100644 --- a/routers/router.go +++ b/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,7 +40,9 @@ //) //beego.AddNamespace(ns) //beego.Router("/basic/api/car/app/user", &controllers.UserController{}) - beego.SetStaticPath("/download", "download") + 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") -- Gitblit v1.8.0