diff --git a/application/index/controller/Index.php b/application/index/controller/Index.php index 98becc33..3a8ca828 100644 --- a/application/index/controller/Index.php +++ b/application/index/controller/Index.php @@ -63,6 +63,7 @@ class Index extends Base // 查询用户登录次数 $admin = new \app\admin\model\Admin; $userid = session('userid'); + $list['username'] = session('username'); $list['denglu'] = $admin->where('id',$userid) ->field('denglucishu,lastip,lasttime') ->find(); @@ -86,19 +87,4 @@ class Index extends Base return $this->fetch(); } - public function exit() - { - // 清除cookie - cookie(null, 'think_'); - // 清除session(当前作用域) - session(null); - - // 跳转页面 - $this->redirect('/login'); - - } - - - - } diff --git a/application/index/view/index/index.html b/application/index/view/index/index.html index 51ea05b0..c084da48 100644 --- a/application/index/view/index/index.html +++ b/application/index/view/index/index.html @@ -2,7 +2,7 @@ - 后台登录-X-admin2.1 + {$list.title} v{$list['version']} diff --git a/application/index/view/index/welcome.html b/application/index/view/index/welcome.html index 37bdf0d4..12d8240f 100644 --- a/application/index/view/index/welcome.html +++ b/application/index/view/index/welcome.html @@ -12,7 +12,7 @@
欢迎管理员: - test!当前时间:2018-04-25 20:50:53 在tab打开 + {$list['username']}!当前时间:{php} echo date('Y-m-d h:m:s'){/php} 在tab打开
数据统计 @@ -80,12 +80,7 @@ - 新版x-admin 2.0上线了 - - - - - 交流qq群:(519492808) + 新版正式上线了!前端改成X-admin,看着更舒服使用更顺手。 @@ -97,18 +92,15 @@
- - - - + - + @@ -120,7 +112,10 @@ - + + + + @@ -134,33 +129,7 @@
xxx版本1.0.180420
服务器地址x.xuebingsi.com
{$list.server.SERVER_ADDR}
操作系统 WINNT
运行环境Apache/2.4.23 (Win32) OpenSSL/1.0.2j mod_fcgid/2.3.9
{$list.server.SERVER_SOFTWARE}
PHP版本 5.6.27
5.5.53
ThinkPHP5.0.18
{$Think.version}
X-admin版本2.1
上传附件限制 2M
-
- 开发团队 -
- - - - - - - - - - -
版权所有xuebingsi(xuebingsi) - 访问官网
开发者马志斌(113664000@qq.com)
-
-
-
感谢layui,百度Echarts,jquery,本系统由x-admin提供技术支持。
+
感谢{$list.thinks}本系统由大连巴掌(w86112@vip.163.com)提供技术支持。
- \ No newline at end of file diff --git a/application/login/controller/Index.php b/application/login/controller/Index.php index c247d452..415fc2b4 100644 --- a/application/login/controller/Index.php +++ b/application/login/controller/Index.php @@ -21,6 +21,19 @@ class Index extends Controller // 清除session(当前作用域) session(null); + //实例化数据模型 + $sysbasemod = new \app\system\model\SystemBase; + + // 查询系统信息 + $list['title'] = $sysbasemod + ->order(['id'=>'desc']) + ->limit(1) + ->value('title'); + + $list['version'] = config('app.chengji.version'); + + $this->assign('list',$list); + // 渲染输出 return $this->fetch(); } @@ -35,7 +48,7 @@ class Index extends Controller // 获取表单数据 - $data = request()->only(['username','password','captcha']); + $data = request()->only(['username','password']); // 验证表单数据 @@ -45,10 +58,10 @@ class Index extends Controller $this->error($msg); } - if(!captcha_check($data['captcha'])) - { - $this->error('验证码错误'); - } + // if(!captcha_check($data['captcha'])) + // { + // $this->error('验证码错误'); + // } // 验证用户名和密码 @@ -76,13 +89,13 @@ class Index extends Controller $userinfo->save(); // 跳转到首页 - $this->redirect(url('/')); + $data=['msg'=>'验证成功','status'=>1]; }else{ // 提示错误信息 - $this->error('用户名或密码错误'); + $data=['msg'=>'用户名或密码错误','status'=>0]; } - return ''; + return json($data); } diff --git a/application/login/validate/Yanzheng.php b/application/login/validate/Yanzheng.php index 6648350c..a5e006d4 100644 --- a/application/login/validate/Yanzheng.php +++ b/application/login/validate/Yanzheng.php @@ -15,13 +15,10 @@ class Yanzheng extends Validate protected $rule = [ 'username' => 'require', 'password' => 'require', - 'captcha' => 'require' ]; protected $message = [ 'username.require' => '用户名必须填写', 'password.require' => '密码必须填写', - 'password.number' => '密码必须是数字', - 'captcha.require' => '验证码必须填写', ]; } diff --git a/application/login/view/index/index.html b/application/login/view/index/index.html index 5ab6049a..2ee149df 100644 --- a/application/login/view/index/index.html +++ b/application/login/view/index/index.html @@ -1,72 +1,71 @@ - - + + - - - - - - -{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/css/H-ui.min.css" /} -{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/H-ui.login.css" /} -{css rel="stylesheet" type="text/css" href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/style.css" /} -{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.css" /} + + {$list['title']} v{$list['version']} + + + + + + + + + + - -后台登录 - H-ui.admin v3.1 - - - - -
-
-
-
-
- -
- -
-
-
- -
- -
-
-
-
- -
-
-
-
- -
-
-
-
- - -
-
-
-
-
- -{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/jquery/1.9.1/jquery.min.js"} -{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/js/H-ui.min.js"} + + +
+
成绩管理v{$list['version']}-管理登录
+
+ +
+ +
+ +
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/config/app.php b/config/app.php index 5d88bc35..20d2bc29 100644 --- a/config/app.php +++ b/config/app.php @@ -144,7 +144,7 @@ return [ 'exception_handle' => '', // 版本号 'chengji' => [ - 'version' => '1.0', + 'version' => '1.5', ], // Auth权限验证公共配置 'auth' => [ diff --git a/database/seeds/SystemBase.php b/database/seeds/SystemBase.php index c3ee1d19..31f94531 100644 --- a/database/seeds/SystemBase.php +++ b/database/seeds/SystemBase.php @@ -19,9 +19,9 @@ class SystemBase extends Seeder 'create_time' => time(), 'update_time' => time(), 'title' => '学生成绩统计系统', - 'keywords' => '成绩统计,成绩管理', - 'description' => '适合我们的才是好用的', - 'thinks' => 'H-ui前端框架、ThinkPhp框架', + 'keywords' => '成绩统计,成绩管理,成绩分析', + 'description' => '适合的才是好用的。', + 'thinks' => 'ThinkPHP,X-admin,百度Echarts,jquery。', 'danwei' => '大连长兴岛经济区教科培中心', ]; // 保存数据 diff --git a/route/index.php b/route/index.php index f2481252..b175685d 100644 --- a/route/index.php +++ b/route/index.php @@ -11,4 +11,3 @@ Route::rule('/','index/index/index'); //主页 Route::rule('welcome','index/index/welcome'); //欢迎页 -Route::rule('exit','index/index/exit'); // 退出