From aa5fbd5dc6b79d7a0801ab5ee045dfa6ab77b2f8 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期五, 07 八月 2020 16:47:28 +0800
Subject: [PATCH] use hik old server

---
 routers/router.go |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/routers/router.go b/routers/router.go
index e2cd36d..105255c 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,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")
@@ -52,4 +56,6 @@
 	beego.Router(preApi+"/user/delPlateNo", &controllers.UserController{}, "*:DelPlateNo")
 
 	beego.Router(preApi+"/user/all", &controllers.UserController{}, "*:GetUserAll")
+
+	beego.Router(preApi+"/car/crossRecord", &controllers.CarController{}, "*:CrossRecord")
 }

--
Gitblit v1.8.0