update:优化登录
This commit is contained in:
parent
08b3e472a9
commit
42e6cd36aa
@ -23,10 +23,8 @@ class Index extends CatchController
|
||||
public function login(LoginRequest $request, CatchAuth $auth)
|
||||
{
|
||||
try {
|
||||
$params = $request->param();
|
||||
$token = $auth->attempt($params);
|
||||
return CatchResponse::success([
|
||||
'token' => $token,
|
||||
'token' => $auth->attempt($request->param()),
|
||||
], '登录成功');
|
||||
} catch (\Exception $exception) {
|
||||
$code = $exception->getCode();
|
||||
|
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
namespace catcher\command;
|
||||
|
||||
use catcher\CatchAdmin;
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
use think\console\input\Argument;
|
||||
use think\console\input\Option;
|
||||
use think\console\Output;
|
||||
|
||||
class ModuleCacheCommand extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
// 指令配置
|
||||
$this->setName('catch:cache')
|
||||
->setDescription('cache routes, views, services of module');
|
||||
}
|
||||
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
CatchAdmin::cacheRoutes();
|
||||
CatchAdmin::cacheServices();
|
||||
CatchAdmin::cacheViews();
|
||||
// 指令输出
|
||||
$output->info('succeed!');
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user