From 0442cb565093c2f6a807b5605a98df108ed2305d Mon Sep 17 00:00:00 2001 From: toogee Date: Sun, 31 May 2020 12:20:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E8=88=AC=E5=B8=90=E6=88=B7=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=9D=83=E9=99=90=E7=9A=84=E6=8E=92=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Login.php | 6 +++--- app/admin/view/index/index.html | 2 +- app/middleware/Auth.php | 2 +- public/static/res/mods/index.js | 16 ---------------- 4 files changed, 5 insertions(+), 21 deletions(-) diff --git a/app/admin/controller/Login.php b/app/admin/controller/Login.php index 118b14d..0343a5b 100644 --- a/app/admin/controller/Login.php +++ b/app/admin/controller/Login.php @@ -15,8 +15,8 @@ class Login { if(Session::has('admin_id')){ - return redirect('/admin/index/index'); - } + return redirect((string) url('index/index')); + } if(Request::isAjax()){ $data = Request::param(); @@ -33,7 +33,7 @@ class Login $res = $user->login($data); if ($res == 1) { - $res = ['code'=>0,'msg'=>'登陆成功']; + $res = ['code'=>0,'msg'=>'登陆成功' 'url'=>(string) url('index/index')]; //$res['data']['access_token'] = $data['__token__']; } else { $res = ['code'=>-1,'msg'=>$res,'url'=>'admin/login']; diff --git a/app/admin/view/index/index.html b/app/admin/view/index/index.html index fc22da8..91eb90c 100644 --- a/app/admin/view/index/index.html +++ b/app/admin/view/index/index.html @@ -8,7 +8,7 @@
- +
diff --git a/app/middleware/Auth.php b/app/middleware/Auth.php index eefd4ad..ec1ae03 100644 --- a/app/middleware/Auth.php +++ b/app/middleware/Auth.php @@ -26,7 +26,7 @@ class Auth //登陆后检验权限 if (Session::has('admin_id')) { // 排除权限 - $not_check = ['admin/Index/index','admin/Index/home','admin/Set/info','admin/Set/password','admin/User/logout']; + $not_check = ['admin/Login/index','admin/Index/index','admin/Index/home','admin/Set/info','admin/Set/password','admin/User/logout']; if (!in_array($app . '/' . $controller . '/' . $action, $not_check)) { $auth = new UserAuth(); diff --git a/public/static/res/mods/index.js b/public/static/res/mods/index.js index 7415659..56d45b8 100644 --- a/public/static/res/mods/index.js +++ b/public/static/res/mods/index.js @@ -859,22 +859,6 @@ layui.define(['layer', 'laytpl', 'form', 'element', 'upload', 'util'], function( if(type === 'bar1'){ //slayer.msg('打开 index.js,开启发表新帖的路径'); location.href = articleAdd; - } - //分享 - if(type === 'bar2'){ - if(navigator.userAgent.indexOf("Html5Plus") > -1) { - //5+ 原生分享 - window.plusShare({ - title: "my-app-name",//应用名字 - content: "分享具体内容", - href: location.href,//分享出去后,点击跳转地址 - thumbs: ["/static/share/icon/wx.png"] //分享缩略图 - }, function(result) { - //分享回调 - }); - } else { - //原有wap分享实现 - } } } });