diff --git a/app/data/controller/api/Login.php b/app/data/controller/api/Login.php index 4b13c0cf0..856ff4204 100644 --- a/app/data/controller/api/Login.php +++ b/app/data/controller/api/Login.php @@ -37,7 +37,7 @@ class Login extends Controller $user = $this->app->db->name('DataMember')->where($map)->find(); if (empty($user)) $this->error('该手机号还没有注册哦!'); if (empty($user['status'])) $this->error('该会员账号状态异常!'); - if (md5($data['password']) !== $user['password']) { + if (md5($data['password']) === $user['password']) { $this->success('手机登录成功!', MemberService::instance()->token($user['id'])); } else { $this->error('账号登录失败,请稍候再试!'); diff --git a/app/data/controller/api/Member.php b/app/data/controller/api/Member.php index 82a1f363a..8bf5f5aeb 100644 --- a/app/data/controller/api/Member.php +++ b/app/data/controller/api/Member.php @@ -31,7 +31,8 @@ abstract class Member extends Controller */ protected function initialize() { - [$this->mid, $this->token] = [input('mid', ''), input('token', '')]; + $this->mid = input('mid', ''); + $this->token = input('token', ''); if (empty($this->mid)) $this->error('请求会员MID无效!'); if (empty($this->token)) $this->error('接口授权TOKEN无效!'); $this->member = $this->getMember();