From fb26551c57e41c149924a2b064ae69c20c67a559 Mon Sep 17 00:00:00 2001 From: ZJY <764763903@qq.com> Date: Wed, 1 Sep 2021 21:41:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E6=94=BE=E5=90=8E=E5=8F=B0=E3=80=82?= =?UTF-8?q?=E3=80=82=E3=80=82=E3=80=82=E8=AF=B7=E5=8B=BF=E6=8B=89=E5=8F=96?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/base.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/controllers/base.go b/controllers/base.go index 16a506c..3dfae5a 100644 --- a/controllers/base.go +++ b/controllers/base.go @@ -10,6 +10,7 @@ import ( zh_translations "gopkg.in/go-playground/validator.v9/translations/zh" "net/http" "strconv" + "strings" ) var validate *validator.Validate @@ -115,12 +116,9 @@ func (c *BaseController) Logined() *BaseController { c.StopRun() } else { c.PtPin = v.(string) - if "764763903" == c.PtPin { + if strings.Contains(models.Config.Master, v.(string)) { c.Master = true } - //if strings.Contains(models.Config.Master, v.(string)) { - // c.Master = true - //} } return c }