Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
hujun
tl_estate
Commits
f4ba4ae3
Commit
f4ba4ae3
authored
Dec 15, 2017
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
time
parent
dac1d434
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
Basic.php
application/api/extend/Basic.php
+2
-3
route.php
application/route.php
+1
-0
No files found.
application/api/extend/Basic.php
View file @
f4ba4ae3
...
@@ -82,7 +82,7 @@ class Basic extends Controller
...
@@ -82,7 +82,7 @@ class Basic extends Controller
exit
;
exit
;
}
}
$jwt
=
new
\Firebase\JWT\JWT
();
$jwt
=
new
\Firebase\JWT\JWT
();
$this
->
authToken
=
$this
->
params
[
'AuthToken'
];
//
$this->authToken = $this->params['AuthToken'];
$result
=
$jwt
->
decode
(
$this
->
authToken
,
config
(
'jwt_key'
),
array
(
'HS256'
));
//解码token
$result
=
$jwt
->
decode
(
$this
->
authToken
,
config
(
'jwt_key'
),
array
(
'HS256'
));
//解码token
$this
->
userId
=
$result
->
data
->
id
;
$this
->
userId
=
$result
->
data
->
id
;
$this
->
phone
=
$result
->
data
->
phone
;
$this
->
phone
=
$result
->
data
->
phone
;
...
@@ -95,9 +95,8 @@ class Basic extends Controller
...
@@ -95,9 +95,8 @@ class Basic extends Controller
public
function
verifyTime
()
public
function
verifyTime
()
{
{
$today
=
Time
::
today
();
//authToken有效期为30天
//authToken有效期为30天
if
((
$today
-
$this
->
timeStamp_
)
>
2592000
)
{
if
((
time
()
-
$this
->
timeStamp_
)
>
2592000
)
{
echo
json_encode
(
array
(
"code"
=>
"101"
,
"msg"
=>
"AuthToken失效,请重新登录!"
,
"data"
=>
[],
"type"
=>
"json"
));
echo
json_encode
(
array
(
"code"
=>
"101"
,
"msg"
=>
"AuthToken失效,请重新登录!"
,
"data"
=>
[],
"type"
=>
"json"
));
exit
;
exit
;
}
}
...
...
application/route.php
View file @
f4ba4ae3
...
@@ -95,6 +95,7 @@ Route::group('api', [
...
@@ -95,6 +95,7 @@ Route::group('api', [
//post AppointmentTime
//post AppointmentTime
'getAppointmentSeeShopList'
=>
[
'api/appointmentTime/getAppointmentSeeShopList'
,
[
'method'
=>
'post'
]
],
'getAppointmentSeeShopList'
=>
[
'api/appointmentTime/getAppointmentSeeShopList'
,
[
'method'
=>
'post'
]
],
'addAppointmentSeeShop'
=>
[
'api/appointmentTime/addAppointmentSeeShop'
,
[
'method'
=>
'post'
]
],
//tradeLog
//tradeLog
...
...
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