创建模型

This commit is contained in:
2025-05-12 09:04:46 +08:00
parent fc327e9f48
commit 8ee9ab1b92
19 changed files with 594 additions and 139 deletions

View File

@@ -25,12 +25,12 @@ class LoginController extends BaseController
public function login()
{
$this->insertField = [
'account', 'password', 'remember'
'phone', 'password', 'remember'
];
$param = $this->checkRequiredFields(request()->post());
return jok(
$this->service->login($param['account'], $param['password']),
$this->service->login($param['phone'], $param['password']),
'登录成功'
);
}
@@ -44,12 +44,12 @@ class LoginController extends BaseController
public function register()
{
$this->insertField = [
'account', 'password', 'email', 'code'
'phone', 'password', 'email', 'code'
];
$param = $this->checkRequiredFields(request()->post());
return jok(
$this->service->register($param['account'], $param['password'], $param['email'], $param['code']),
$this->service->register($param['phone'], $param['password'], $param['email'], $param['code']),
'登录成功'
);
}