From 94e5b90a462b7a3c953114500cd0ee8e577944dc Mon Sep 17 00:00:00 2001 From: Xuexiang825 Date: Wed, 14 Mar 2018 14:47:52 +0800 Subject: [PATCH] =?UTF-8?q?bc=E5=BC=95=E7=94=A8=E5=AF=B9=E8=B1=A1=E6=9C=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=EF=BC=8C=E5=BA=94=E4=B8=BAself?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/common.go b/controllers/common.go index 6d074bd..ba70801 100644 --- a/controllers/common.go +++ b/controllers/common.go @@ -145,7 +145,7 @@ func (self *BaseController) isPost() bool { //获取用户IP地址 func (self *BaseController) getClientIp() string { - s := bc.Ctx.Request.RemoteAddr + s := self.Ctx.Request.RemoteAddr l := strings.LastIndex(s, ":") return s[0:l] }