Browse Source

add to local

stanley-king 4 years ago
parent
commit
4379a982a2
2 changed files with 6 additions and 7 deletions
  1. 6 6
      application/index/controller/Login.php
  2. 0 1
      route/route.php

+ 6 - 6
application/index/controller/Login.php

@@ -9,9 +9,9 @@ class Login extends Controller{
     /**
      * 管理员登录
      * */
-    public function Login(){
-        $username = input('post.username');
-        $password = input('post.password');
+    public function Login() {
+        $username = input('get.username');
+        $password = input('get.password');
 
         $UserModel = new UserModel();
         $hasUser = $UserModel->checkUser($username);
@@ -41,14 +41,14 @@ class Login extends Controller{
         session('username', $hasUser['user_name']);
         session('id', $hasUser['id']);
 
-        json_return(200,[],'success');
+        json_success([]);
     }
     /**
      * 管理员退出
      */
-    public function LoginOut(){
+    public function LoginOut() {
         session('username', null);
         session('id', null);
-        json_return(200,[],'success');
+        json_success([]);
     }
 }

+ 0 - 1
route/route.php

@@ -9,7 +9,6 @@
         'CheckFcode'                => 'index/cabinet/CheckFcode',
         'AddCabinet'                => 'index/cabinet/AddCabinet',
 
-
         'OpenBox'                   => 'index/cabinet/OpenBox',
         'LockCabinet'               => 'index/cabinet/LockCabinet',
         'UnLockCabinet'             => 'index/cabinet/UnLockCabinet',