From 8403ee9c2b45cf4cc80fd72fbdd66f3eadfd2e0b Mon Sep 17 00:00:00 2001 From: lifei6671 Date: Mon, 23 Jul 2018 18:37:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E7=AB=A0=E7=9A=84?= =?UTF-8?q?=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/router.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/routers/router.go b/routers/router.go index e88bec8a..bae268b4 100644 --- a/routers/router.go +++ b/routers/router.go @@ -64,18 +64,18 @@ func init() { beego.Router("/book/setting/delete", &controllers.BookController{}, "post:Delete") //管理文章的路由 - beego.Router("/blogs", &controllers.BlogController{},"*:ManageList") - beego.Router("/blogs/setting/?:id", &controllers.BlogController{}, "*:ManageSetting") - beego.Router("/blogs/edit/?:id",&controllers.BlogController{}, "*:ManageEdit") - beego.Router("/blogs/delete",&controllers.BlogController{}, "post:ManageDelete") - beego.Router("/blogs/upload",&controllers.BlogController{}, "post:Upload") - beego.Router("/blogs/attach/:id",&controllers.BlogController{}, "post:RemoveAttachment") + beego.Router("/manage/blogs", &controllers.BlogController{},"*:ManageList") + beego.Router("/manage/blogs/setting/?:id", &controllers.BlogController{}, "*:ManageSetting") + beego.Router("/manage/blogs/edit/?:id",&controllers.BlogController{}, "*:ManageEdit") + beego.Router("/manage/blogs/delete",&controllers.BlogController{}, "post:ManageDelete") + beego.Router("/manage/blogs/upload",&controllers.BlogController{}, "post:Upload") + beego.Router("/manage/blogs/attach/:id",&controllers.BlogController{}, "post:RemoveAttachment") //读文章的路由 - beego.Router("/blog", &controllers.BlogController{}, "*:List") - beego.Router("/blog/attach/:id:int/:attach_id:int", &controllers.BlogController{},"get:Download") - beego.Router("/blog/:id",&controllers.BlogController{}, "*:Index") + beego.Router("/blogs", &controllers.BlogController{}, "*:List") + beego.Router("/blog-attach/:id:int/:attach_id:int", &controllers.BlogController{},"get:Download") + beego.Router("/blog-:id([0-9]+).html",&controllers.BlogController{}, "*:Index") beego.Router("/api/attach/remove/", &controllers.DocumentController{}, "post:RemoveAttachment") beego.Router("/api/:key/edit/?:id", &controllers.DocumentController{}, "*:Edit")