login新增Service
This commit is contained in:
parent
23fa6ab097
commit
8b4404df55
23
catch/login/LoginService.php
Normal file
23
catch/login/LoginService.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CatchAdmin [Just Like ~ ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2020 http://catchadmin.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: JaguarJack [ njphper@gmail.com ]
|
||||
// +----------------------------------------------------------------------
|
||||
namespace catchAdmin\login;
|
||||
|
||||
use catcher\ModuleService;
|
||||
use think\Service;
|
||||
|
||||
class LoginService extends ModuleService
|
||||
{
|
||||
public function loadRouteFrom()
|
||||
{
|
||||
// TODO: Implement loadRouteFrom() method.
|
||||
return __DIR__ . DIRECTORY_SEPARATOR . 'route.php';
|
||||
}
|
||||
}
|
@ -4,8 +4,11 @@
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
"order": 1,
|
||||
"services": [],
|
||||
"services": [
|
||||
"\\catchAdmin\\login\\LoginService"
|
||||
],
|
||||
"aliases": {},
|
||||
"files": [],
|
||||
"requires": []
|
||||
"requires": [],
|
||||
"enable": true
|
||||
}
|
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
$router->group(function () use ($router){
|
||||
# 登入
|
||||
$router->post('login', '\catchAdmin\login\controller\Index@login');
|
||||
$router->post('logout', '\catchAdmin\login\controller\Index@logout');
|
||||
$router->post('refresh/token', '\catchAdmin\login\controller\Index@refreshToken');
|
||||
})->middleware('auth');
|
||||
|
||||
|
||||
|
10
catch/system/SystemService.php
Normal file
10
catch/system/SystemService.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CatchAdmin [Just Like ~ ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2020 http://catchadmin.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: JaguarJack [ njphper@gmail.com ]
|
||||
// +----------------------------------------------------------------------
|
10
extend/catcher/ModuleService.php
Normal file
10
extend/catcher/ModuleService.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CatchAdmin [Just Like ~ ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2020 http://catchadmin.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: JaguarJack [ njphper@gmail.com ]
|
||||
// +----------------------------------------------------------------------
|
Loading…
x
Reference in New Issue
Block a user