Commit f4ba4ae3 authored by clone's avatar clone

time

parent dac1d434
......@@ -82,7 +82,7 @@ class Basic extends Controller
exit;
}
$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
$this->userId = $result->data->id;
$this->phone = $result->data->phone;
......@@ -95,9 +95,8 @@ class Basic extends Controller
public function verifyTime()
{
$today = Time::today();
//authToken有效期为30天
if (($today - $this->timeStamp_) > 2592000) {
if ((time() - $this->timeStamp_) > 2592000) {
echo json_encode(array( "code" => "101", "msg" => "AuthToken失效,请重新登录!", "data" => [], "type" => "json" ));
exit;
}
......
......@@ -95,6 +95,7 @@ Route::group('api', [
//post AppointmentTime
'getAppointmentSeeShopList' => [ 'api/appointmentTime/getAppointmentSeeShopList', [ 'method' => 'post' ] ],
'addAppointmentSeeShop' => [ 'api/appointmentTime/addAppointmentSeeShop', [ 'method' => 'post' ] ],
//tradeLog
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment