lgy hace 6 días
padre
commit
51e767a285
Se han modificado 2 ficheros con 4 adiciones y 2 borrados
  1. 1 1
      jcjyhr/app/admin/controller/Index.php
  2. 3 1
      jcjyhr/app/admin/library/Auth.php

+ 1 - 1
jcjyhr/app/admin/controller/Index.php

@@ -59,7 +59,7 @@ class Index extends Backend
      * @return void
      * @throws Throwable
      */
-    public function login(): void
+    public function login()//: void
     {
         // 检查登录态
         if ($this->auth->isLogin()) {

+ 3 - 1
jcjyhr/app/admin/library/Auth.php

@@ -166,9 +166,11 @@ class Auth extends \ba\Auth
      * @return bool
      * @throws Throwable
      */
-    public function login(string $username, string $password, bool $keep = false,&$force=0,&$userId=''): bool
+    public function login(string $username, string $password, bool $keep = false,&$force=0,&$userId='')//: bool
     {
+        var_dump($username);
         $this->model = Admin::where('username', $username)->find();
+        var_dump($this->model);die;
         if (!$this->model) {
             $this->setError('Username is incorrect');
             return false;