正在显示
2 个修改的文件
包含
3 行增加
和
3 行删除
| @@ -47,7 +47,7 @@ class Com extends Base | @@ -47,7 +47,7 @@ class Com extends Base | ||
| 47 | $this->response($validate->getError(), 202); | 47 | $this->response($validate->getError(), 202); |
| 48 | } | 48 | } |
| 49 | $manager = new ManagerModel(); | 49 | $manager = new ManagerModel(); |
| 50 | - $info = $manager->login($this->param['account'],$this->param['password']); | 50 | + $info = $manager->login($this->param['username'],$this->param['password']); |
| 51 | if(empty($info)){ | 51 | if(empty($info)){ |
| 52 | $this->response('账号或者密码错误',202,[]); | 52 | $this->response('账号或者密码错误',202,[]); |
| 53 | } | 53 | } |
| @@ -18,9 +18,9 @@ class Manager extends Base | @@ -18,9 +18,9 @@ class Manager extends Base | ||
| 18 | /** | 18 | /** |
| 19 | * 登录 @param $account:账号 $password:密码 | 19 | * 登录 @param $account:账号 $password:密码 |
| 20 | */ | 20 | */ |
| 21 | - public function login($account,$password){ | 21 | + public function login($username,$password){ |
| 22 | //获取当前用户的账号详情 | 22 | //获取当前用户的账号详情 |
| 23 | - $info = $this->read(['account'=>$account,'password'=>$password]); | 23 | + $info = $this->read(['username'=>$username,'password'=>$password]); |
| 24 | if(empty($info) || $info['status'] == 1){ | 24 | if(empty($info) || $info['status'] == 1){ |
| 25 | return []; | 25 | return []; |
| 26 | } | 26 | } |
-
请 注册 或 登录 后发表评论