diff --git a/app/base/controller/TeacherSearchBase.php b/app/base/controller/TeacherSearchBase.php index 4121eb04..df17c772 100644 --- a/app/base/controller/TeacherSearchBase.php +++ b/app/base/controller/TeacherSearchBase.php @@ -1,5 +1,5 @@
- +
diff --git a/app/index/view/index/welcome.html b/app/index/view/index/welcome.html index af747033..f81dfabc 100644 --- a/app/index/view/index/welcome.html +++ b/app/index/view/index/welcome.html @@ -2,7 +2,7 @@ - {php}echo session('webtitle'){/php} + 管理员 欢迎页 diff --git a/app/login/controller/Student.php b/app/login/controller/Student.php index b721a494..ee2b4d3c 100644 --- a/app/login/controller/Student.php +++ b/app/login/controller/Student.php @@ -48,7 +48,7 @@ class Student public function yanzheng() { // 获取表单数据 - $data = request()->only(['username','password','shenfenzhenghao','online']); + $data = request()->only(['username','password','online']); // 验证表单数据 try { @@ -117,7 +117,7 @@ class Student //验证密码 $check = $md5->check($password,$userinfo->password); - + if($check) { session('student', null); @@ -136,7 +136,7 @@ class Student session(null); $data=['msg'=>'学生身份证号或密码错误','status'=>0]; } - return $data; + return $data; } diff --git a/app/login/controller/Teacher.php b/app/login/controller/Teacher.php index 293273a2..47633375 100644 --- a/app/login/controller/Teacher.php +++ b/app/login/controller/Teacher.php @@ -4,7 +4,7 @@ declare (strict_types = 1); namespace app\login\controller; // 引用学生数据模型 -use app\student\model\Student as stu; +use app\teacher\model\Teacher as tch; // 引用加密类 use WhiteHat101\Crypt\APR1_MD5; // 引用验证码类 @@ -47,13 +47,13 @@ class Teacher public function yanzheng() { // 获取表单数据 - $data = request()->only(['username','password','shenfenzhenghao','online']); + $data = request()->only(['username','password','online']); // 验证表单数据 try { // 实例化验证模型 $validate = new \app\login\validate\Yanzheng; - validate(Yanzheng::class)->scene('student')->check($data); + validate(Yanzheng::class)->scene('admin')->check($data); } catch (ValidateException $e) { // 验证失败 输出错误信息 $data=['msg'=>$e->getError(),'status'=>0]; @@ -61,7 +61,7 @@ class Teacher } // 验证用户名和密码 - $check = $this->check($data['username'],$data['password'],$data['shenfenzhenghao']); + $check = $this->check($data['username'],$data['password']); if($check['status']==1) { @@ -75,8 +75,8 @@ class Teacher } // 将本次信息上传到服务器上 - $userinfo = stu::where('username',$data['username']) - ->field('lastip,username,ip,denglucishu,lasttime,thistime') + $userinfo = tch::where('phone',$data['username']) + ->field('lastip,phone,ip,denglucishu,lasttime,thistime') ->find(); $userinfo->lastip = $userinfo->ip; $userinfo->ip = request()->ip(); @@ -103,20 +103,20 @@ class Teacher $md5 = new APR1_MD5(); // 获取服务器密码 - $userinfo = stu::where('shenfenzhenghao', $username)->where('status', 1)->find(); + $userinfo = tch::where('phone', $username)->where('status', 1)->find(); if($userinfo == null) { // 清除session(当前作用域) session(null); // 验证结果; - $data=['msg'=>'学生不存在或被禁用','status'=>0]; + $data=['msg'=>'手机号不存在或被禁用','status'=>0]; return $data; } //验证密码 $check = $md5->check($password,$userinfo->password); - + if($check) { session('teacher', null); @@ -133,8 +133,8 @@ class Teacher cookie('password', null); // 清除session(当前作用域) session(null); - $data=['msg'=>'学生身份证号或密码错误','status'=>0]; + $data=['msg'=>'手机号或密码错误','status'=>0]; } - return $data; + return $data; } } diff --git a/app/login/view/index/shangma_log.html b/app/login/view/index/shangma_log.html index 1f717242..996a7185 100644 --- a/app/login/view/index/shangma_log.html +++ b/app/login/view/index/shangma_log.html @@ -61,9 +61,9 @@
修复已知错误
- 增加各分数段统计、学生成绩查询 + 增加各分数段统计、学生查询成绩、教师查询成绩
- 增加年级最大数、班级最大数、班级别名是否开启、学年节点配置 + 增加年级最大数、班级最大数、班级别名是否开启、学年节点等配置内容
取消录入成绩时对十分位的限制
diff --git a/app/login/view/teacher/index.html b/app/login/view/teacher/index.html index 22cea32b..e87124c9 100644 --- a/app/login/view/teacher/index.html +++ b/app/login/view/teacher/index.html @@ -25,22 +25,20 @@ (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?1fe9097e79cfcf0c8d4547c3a1ba50e0"; - var s = document.getElementsByTagName("script")[0]; + var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); -
+
{$list['webtitle']} {$list['version']}
- +
- -
- +
@@ -72,7 +70,7 @@ }, }) } - + //监听提交 form.on('submit(login)', function(data){ mobile = "{$list['mobile']}"; @@ -95,7 +93,7 @@ } if(data.status == 1) { - window.location.href="/"; + window.location.href="/teacherSearchChengji/index/index"; }else{ layer.msg(data.msg); $('#captchaimg').click(); @@ -123,4 +121,4 @@ - \ No newline at end of file + diff --git a/app/middleware/TeacherLogin.php b/app/middleware/TeacherLogin.php index d74b83a0..c6d6448a 100644 --- a/app/middleware/TeacherLogin.php +++ b/app/middleware/TeacherLogin.php @@ -16,8 +16,8 @@ class TeacherLogin public function handle($request, \Closure $next) { // 尝试从session中获取用户名和密码 - $username = session('?username') ? $username = session('username') : $username = ''; - $password = session('?password') ? $password = session('password') : $password = ''; + $username = session('?teacher.username') ? $username = session('teacher.username') : $username = ''; + $password = session('?teacher.password') ? $password = session('teacher.password') : $password = ''; // 尝试从cookie中获取用户名和密码 if (strlen($username)<1 ) { diff --git a/app/studentSearchChengji/view/index/index.html b/app/studentSearchChengji/view/index/index.html index 17e6c994..e4ba54bc 100644 --- a/app/studentSearchChengji/view/index/index.html +++ b/app/studentSearchChengji/view/index/index.html @@ -27,7 +27,7 @@ + + + + + + + + + + + + +
+ +
+ +
+ + +
+ + + + +
+
+ +
+
+ + + + +
+
+
    +
  • + 我的桌面
+
+
+
关闭当前
+
关闭其它
+
关闭全部
+
+
+
+ +
+
+
+
+
+
+ + + + + + + diff --git a/app/teacherSearchChengji/view/index/welcome.html b/app/teacherSearchChengji/view/index/welcome.html new file mode 100644 index 00000000..62ed3f8c --- /dev/null +++ b/app/teacherSearchChengji/view/index/welcome.html @@ -0,0 +1,95 @@ + + + + + 教师 欢迎页 + + + + + + + + + + + + + +
+
+
+
+
+
欢迎  + {$list['xingming']} 老师,您正在使用的是『{$list.webtitle}{$list.version}』    当前时间: + +
+
+
+
+ + +
+
感谢{$list.thinks}提供技术支持。
+
+
+
+ + +