From 4017349920b546f42460cedb8a63be8d03b12774 Mon Sep 17 00:00:00 2001 From: liuxiaolong <736321739@qq.com> Date: 星期三, 03 七月 2019 19:40:22 +0800 Subject: [PATCH] fix area bug --- controllers/area.go | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/controllers/area.go b/controllers/area.go index 0b5ff28..6dbf8e8 100644 --- a/controllers/area.go +++ b/controllers/area.go @@ -87,7 +87,7 @@ // @Param area body controllers.AreaVo true "鍖哄煙缁撴瀯" // @Success 200 {string} json "{"code":200, data:"",msg:"璇锋眰鎴愬姛", success:true}" // @Failure 200 {string} json "{"code":"閿欒鐮�", data:"鍑洪敊淇℃伅",msg:"璇锋眰澶辫触", success:false}" -// @Router /data/api-v/area/update/{id} [put] +// @Router /data/api-v/area/update [post] func (ac AreaController) AreaUpdate(c *gin.Context) { var api dbapi.AreaApi var model AreaVo @@ -112,13 +112,13 @@ // @Param id query int true "褰撳墠id" // @Success 200 {string} json "{"code":200, data:"鍒犻櫎鐨勫尯鍩熶俊鎭�",msg:"璇锋眰鎴愬姛", success:true}" // @Failure 200 {string} json "{"code":"閿欒鐮�", data:"鍑洪敊淇℃伅",msg:"璇锋眰澶辫触", success:false}" -// @Router /data/api-v/area/del [get] +// @Router /data/api-v/area/del [post] func (ac AreaController) AreaDelete(c *gin.Context) { var api dbapi.AreaApi - id := c.Query("id") + id := c.PostForm("id") areaId, err := strconv.Atoi(id) if err != nil { - util.ResponseFormat(c, code.ComError, "浼犲叆闈炴暣褰㈡棤娉曡В鏋�") + util.ResponseFormat(c, code.ComError, "鍙傛暟鏈夎") return } -- Gitblit v1.8.0