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
bbb5511e
authored
Nov 29, 2022
by
SUDPTDUBLXEROFX\Administrator
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
更新购物车
parent
f49da4de
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
app/Http/Middleware/CheckApiLogin.php
app/Http/Middleware/CheckApiLogin.php
View file @
bbb5511e
...
@@ -21,7 +21,7 @@ class CheckApiLogin
...
@@ -21,7 +21,7 @@ class CheckApiLogin
{
{
if
(
!
\Auth
::
check
()
)
{
if
(
!
\Auth
::
check
()
)
{
if
(
in_array
(
$request
->
path
(),
$this
->
no_login_url
)){
//一些接口可以登录或者不登录都可以通行
if
(
in_array
(
$request
->
path
(),
$this
->
no_login_url
)){
//一些接口可以登录或者不登录都可以通行
request
()
->
offsetSet
(
"user"
,(
object
)[
"id"
=>
0
,
"gid"
=>
\Arr
::
get
(
$_COOKIE
,
"sem_gid"
)]);
request
()
->
offsetSet
(
"user"
,(
object
)[
"id"
=>
0
,
"gid"
=>
\Arr
::
get
(
$_COOKIE
,
"sem_gid"
,
""
)]);
return
$next
(
$request
);
return
$next
(
$request
);
}
else
{
}
else
{
$response
=
[
$response
=
[
...
@@ -32,7 +32,7 @@ class CheckApiLogin
...
@@ -32,7 +32,7 @@ class CheckApiLogin
}
}
}
else
{
}
else
{
$request
->
user
=
\Auth
::
user
();
$request
->
user
=
\Auth
::
user
();
$request
->
user
->
gid
=
""
;
$request
->
user
->
gid
=
\Arr
::
get
(
$_COOKIE
,
"sem_gid"
,
""
)
;
return
$next
(
$request
);
return
$next
(
$request
);
}
}
}
}
...
...
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