From a0966520eb7175c30ebf17f643456a280365d740 Mon Sep 17 00:00:00 2001 From: sole Date: Thu, 14 Mar 2019 10:38:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E9=94=99=E8=AF=AF=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 业务错误代码返回 --- pkg/app/response.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/app/response.go b/pkg/app/response.go index bce6ae20..5afb0e90 100644 --- a/pkg/app/response.go +++ b/pkg/app/response.go @@ -18,7 +18,7 @@ type Response struct { func (g *Gin) Response(httpCode, errCode int, data interface{}) { g.C.JSON(httpCode, Response{ - Code: httpCode, + Code: errCode, Msg: e.GetMsg(errCode), Data: data, })