This commit is contained in:
wuyanwen 2020-01-07 19:18:24 +08:00
parent ba91154ee8
commit 9e28cbd91d

View File

@ -12,18 +12,6 @@ use think\captcha\Captcha;
class Index extends CatchController class Index extends CatchController
{ {
/**
* 登录
*
* @time 2019年11月30日
* @throws \Exception
* @return string
*/
public function index(): string
{
return $this->fetch();
}
/** /**
* 登陆 * 登陆
* *
@ -35,7 +23,7 @@ class Index extends CatchController
public function login(LoginRequest $request, CatchAuth $auth) public function login(LoginRequest $request, CatchAuth $auth)
{ {
$params = $request->param(); $params = $request->param();
$token = $auth->attempt($params); $token = $auth->attempt($params);
$user = $auth->user(); $user = $auth->user();
@ -74,16 +62,4 @@ class Index extends CatchController
return CatchResponse::fail('登出失败'); return CatchResponse::fail('登出失败');
} }
/**
*
* @time 2019年12月12日
* @param Captcha $captcha
* @param null $config
* @return \think\Response
*/
public function captcha(Captcha $captcha, $config = null): \think\Response
{
return $captcha->create($config);
}
} }