Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
ruer_cms
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蔡闯
ruer_cms
Commits
990cab2c
Commit
990cab2c
authored
May 26, 2021
by
蔡闯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2021-5-26
parent
79ea795c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
app/api/controller/Base.php
app/api/controller/Base.php
+6
-6
No files found.
app/api/controller/Base.php
View file @
990cab2c
...
@@ -11,12 +11,12 @@ class Base extends \app\BaseController
...
@@ -11,12 +11,12 @@ class Base extends \app\BaseController
parent
::
__construct
(
$app
);
parent
::
__construct
(
$app
);
//
if(Request::header("token")){
if
(
Request
::
header
(
"token"
)){
//
$decodeData= (array)JWT::decode(Request::header('token'),config('app.jwt_key'),array("HS256"));
$decodeData
=
(
array
)
JWT
::
decode
(
Request
::
header
(
'token'
),
config
(
'app.jwt_key'
),
array
(
"HS256"
));
//
$this->uid = $decodeData['uid'];
$this
->
uid
=
$decodeData
[
'uid'
];
//
} else {
}
else
{
//
echo json_encode(['code'=>401,'msg'=>"token不存在!"]);exit;
echo
json_encode
([
'code'
=>
401
,
'msg'
=>
"token不存在!"
]);
exit
;
//
}
}
}
}
}
}
\ No newline at end of file
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