Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
90ad5746
authored
Nov 12, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
登陆问题
parent
696889b7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
.idea/workspace.xml
app/Http/Controllers/Api/AuthApiController.php
app/Http/Middleware/CheckApiLogin.php
.idea/workspace.xml
View file @
90ad5746
...
...
@@ -2,6 +2,9 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"fb90add0-1393-48c2-9f26-72365d42cd03"
name=
"变更"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/app/Http/Controllers/Api/AuthApiController.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/app/Http/Controllers/Api/AuthApiController.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/app/Http/Middleware/CheckApiLogin.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/app/Http/Middleware/CheckApiLogin.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/bootstrap/app.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/bootstrap/app.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/bootstrap/cache/.gitignore"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/bootstrap/cache/.gitignore"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/storage/app/.gitignore"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/storage/app/.gitignore"
afterDir=
"false"
/>
...
...
@@ -186,7 +189,7 @@
<workItem
from=
"1667266026118"
duration=
"40321000"
/>
<workItem
from=
"1667959054458"
duration=
"183000"
/>
<workItem
from=
"1667986756173"
duration=
"14315000"
/>
<workItem
from=
"1668150640953"
duration=
"
3495
000"
/>
<workItem
from=
"1668150640953"
duration=
"
4916
000"
/>
</task>
<servers
/>
</component>
...
...
app/Http/Controllers/Api/AuthApiController.php
View file @
90ad5746
...
...
@@ -73,6 +73,8 @@ class AuthApiController extends Controller
public
function
logout
(
Request
$request
)
{
$cookie
=
Cookie
::
forget
(
'sem_email'
);
Cookie
::
queue
(
$cookie
);
Auth
::
logout
();
return
$this
->
setSuccess
(
'Logout success'
);
}
...
...
app/Http/Middleware/CheckApiLogin.php
View file @
90ad5746
...
...
@@ -16,7 +16,7 @@ class CheckApiLogin
*/
public
function
handle
(
$request
,
Closure
$next
)
{
if
(
!
\Auth
::
check
())
{
//一些接口可以登录或者不登录都可以通行
if
(
!
\Auth
::
check
()
&&
!
$request
->
is
(
'api/cart/*'
)
)
{
//一些接口可以登录或者不登录都可以通行
$response
=
[
'code'
=>
1
,
'msg'
=>
'need login...'
,
...
...
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