更新
This commit is contained in:
@@ -68,11 +68,11 @@ class Member extends Model {
|
||||
$map['mobile'] = $username;
|
||||
break;
|
||||
default:
|
||||
$this->error = "参数错误";
|
||||
throw new \think\Exception('参数错误', 10006);
|
||||
return false; //参数错误
|
||||
}
|
||||
if (!$username) {
|
||||
$this->error = "用户名不能为空";
|
||||
throw new \think\Exception('用户名不能为空', 10006);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -84,11 +84,11 @@ class Member extends Model {
|
||||
$this->record($user);
|
||||
return $user->append(array('access_token', 'avatar'))->visible($this->loginVisible)->toArray(); //登录成功,返回用户信息
|
||||
} else {
|
||||
$this->error = "密码错误";
|
||||
throw new \think\Exception('密码错误', 10006);
|
||||
return false; //密码错误
|
||||
}
|
||||
} else {
|
||||
$this->error = "用户不存在或被禁用";
|
||||
throw new \think\Exception('用户不存在或被禁用', 10006);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace app\model;
|
||||
* 菜单模型类
|
||||
* @author molong <molong@tensent.cn>
|
||||
*/
|
||||
class Menu extends \app\common\model\Base {
|
||||
class Menu extends \think\Model {
|
||||
|
||||
protected $type = array(
|
||||
'id' => 'integer',
|
||||
|
||||
Reference in New Issue
Block a user