新增用户登录接口
This commit is contained in:
parent
9046da6125
commit
93bbca9598
|
@ -49,7 +49,7 @@ class User extends BaseController
|
||||||
{
|
{
|
||||||
$param = get_params();
|
$param = get_params();
|
||||||
if (empty($param['username']) || empty($param['password'])) {
|
if (empty($param['username']) || empty($param['password'])) {
|
||||||
$this->apiError('参数错误');
|
$this->apiError('用户名密码不能为空');
|
||||||
}
|
}
|
||||||
// 校验用户名密码
|
// 校验用户名密码
|
||||||
$user = Db::name('Admin')->where(['username' => $param['username']])->find();
|
$user = Db::name('Admin')->where(['username' => $param['username']])->find();
|
||||||
|
|
Loading…
Reference in New Issue