*
Showing
1 changed file
with
6 additions
and
3 deletions
... | @@ -201,9 +201,12 @@ class PropertyTrackService extends Service | ... | @@ -201,9 +201,12 @@ class PropertyTrackService extends Service |
201 | 'id' => $res->id, | 201 | 'id' => $res->id, |
202 | ]; | 202 | ]; |
203 | 203 | ||
204 | $token = getToken(mt_rand()); | 204 | $token = getToken(mt_rand()); |
205 | RedisClient::instance()->set($token, json_encode($info), 'EX', config('musician.property')['token_valid']); | 205 | $token_valid = config('musician.property')['token_valid']; |
206 | return Response::success(['token'=>$token]); | 206 | $expire_time = time() + $token_valid; |
207 | |||
208 | RedisClient::instance()->set($token, json_encode($info), 'EX', $token_valid); | ||
209 | return Response::success(['token'=>$token, 'expire_time'=>$expire_time]); | ||
207 | } | 210 | } |
208 | 211 | ||
209 | 212 | ... | ... |
-
Please register or sign in to post a comment