作者 liyuhang

csdm

... ... @@ -47,7 +47,7 @@ class Com extends Base
$this->response($validate->getError(), 202);
}
$manager = new ManagerModel();
$info = $manager->login($this->param['account'],$this->param['password']);
$info = $manager->login($this->param['username'],$this->param['password']);
if(empty($info)){
$this->response('账号或者密码错误',202,[]);
}
... ...
... ... @@ -18,9 +18,9 @@ class Manager extends Base
/**
* 登录 @param $account:账号 $password:密码
*/
public function login($account,$password){
public function login($username,$password){
//获取当前用户的账号详情
$info = $this->read(['account'=>$account,'password'=>$password]);
$info = $this->read(['username'=>$username,'password'=>$password]);
if(empty($info) || $info['status'] == 1){
return [];
}
... ...