This commit is contained in:
2020-02-17 23:43:41 +08:00
parent 259d232d89
commit 5fb45fc57c
73 changed files with 711 additions and 357 deletions

View File

@@ -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;
}
}

View File

@@ -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',