Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
aic_duty_strategy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yinxiaoling
aic_duty_strategy
Commits
08befeb0
Commit
08befeb0
authored
May 19, 2020
by
yinxiaoling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退出登录
parent
2507abb6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
LoginApiController.php
app/Http/Controllers/LoginApiController.php
+10
-0
api.php
routes/api.php
+4
-1
No files found.
app/Http/Controllers/LoginApiController.php
View file @
08befeb0
...
...
@@ -57,4 +57,14 @@ class LoginApiController extends Controller
}
//退出登录
public
function
loginOut
(
Request
$request
){
$user_sn
=
$request
->
user_sn
;
$rKey
=
'strategy:login:'
.
$user_sn
;
if
(
Redis
::
exists
(
$rKey
)){
Redis
::
del
(
$rKey
);
}
return
$this
->
successWithInfo
(
'成功退出登录'
);
}
}
routes/api.php
View file @
08befeb0
...
...
@@ -20,7 +20,10 @@ Route::middleware('auth:api')->get('/user', function (Request $request) {
//接口路由
Route
::
post
(
'login'
,
'LoginApiController@index'
);
Route
::
group
([
'middleware'
=>
'check.apikey'
,
'namespace'
=>
'strategy'
],
function
()
{
Route
::
post
(
'loginOut'
,
'LoginApiController@loginOut'
)
->
middleware
(
'check.apikey'
);
Route
::
group
([
'middleware'
=>
'check.apikey'
,
'namespace'
=>
'strategy'
],
function
()
{
Route
::
post
(
'strategy/getUsersList'
,
'StrategySetController@getUsersList'
)
->
name
(
'strategy.getUsersList'
);
//子账号列表
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment