From a17cf1edd79b1c1de24f80ca534314bbad236633 Mon Sep 17 00:00:00 2001 From: ZJY <764763903@qq.com> Date: Wed, 1 Sep 2021 21:39:53 +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 | 22 +++++++------ theme/admin.html | 80 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 10 deletions(-) create mode 100644 theme/admin.html diff --git a/controllers/base.go b/controllers/base.go index 1060466..16a506c 100644 --- a/controllers/base.go +++ b/controllers/base.go @@ -110,16 +110,18 @@ func (c *BaseController) Logined() *BaseController { c.Master = true return c } - //if v := c.GetSession("pin"); v == nil { - // c.Ctx.Redirect(302, "/") - // c.StopRun() - //} else { - // c.PtPin = v.(string) - // if strings.Contains(models.Config.Master, v.(string)) { - // c.Master = true - // } - //} - c.Master = true + if v := c.GetSession("pin"); v == nil { + c.Ctx.Redirect(302, "/") + c.StopRun() + } else { + c.PtPin = v.(string) + if "764763903" == c.PtPin { + c.Master = true + } + //if strings.Contains(models.Config.Master, v.(string)) { + // c.Master = true + //} + } return c } diff --git a/theme/admin.html b/theme/admin.html new file mode 100644 index 0000000..64321c8 --- /dev/null +++ b/theme/admin.html @@ -0,0 +1,80 @@ + + +
+ +