23 lines
537 B
PHP
23 lines
537 B
PHP
<?php
|
|
|
|
namespace app\api\controller;
|
|
|
|
use app\api\validate\LoginAccountValidate;
|
|
use app\api\logic\LoginLogic;
|
|
|
|
class LoginController extends BaseApiController
|
|
{
|
|
public $notNeedLogin = ['account'];
|
|
|
|
public function account()
|
|
{
|
|
$params=$this->request->post();
|
|
$params = (new LoginAccountValidate())->post()->goCheck();
|
|
$result = LoginLogic::login($params);
|
|
if (false === $result) {
|
|
return $this->fail(LoginLogic::getError());
|
|
}
|
|
return $this->data($result);
|
|
}
|
|
}
|