jsApi
This commit is contained in:
@@ -269,7 +269,7 @@ class Feishu
|
|||||||
return $cachedTicket;
|
return $cachedTicket;
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = $this->baseUri . '/open-apis/jssdk/ticket/get';
|
$url = $this->baseUri . '/jssdk/ticket/get';
|
||||||
|
|
||||||
$headers = [
|
$headers = [
|
||||||
'Authorization: Bearer ' . $accessToken,
|
'Authorization: Bearer ' . $accessToken,
|
||||||
@@ -282,8 +282,8 @@ class Feishu
|
|||||||
throw new BusinessException('获取 jsapi_ticket 失败: ' . json_encode($result));
|
throw new BusinessException('获取 jsapi_ticket 失败: ' . json_encode($result));
|
||||||
}
|
}
|
||||||
|
|
||||||
$ticket = $result['ticket'];
|
$ticket = $result['data']['ticket'];
|
||||||
$expire = $result['expire_in'] - 300; // 提前5分钟过期
|
$expire = $result['data']['expire_in'] - 300; // 提前5分钟过期
|
||||||
|
|
||||||
// 缓存 ticket
|
// 缓存 ticket
|
||||||
Cache::set($this->abbr.'-feishu:jsapi_ticket', $ticket, $expire);
|
Cache::set($this->abbr.'-feishu:jsapi_ticket', $ticket, $expire);
|
||||||
|
|||||||
Reference in New Issue
Block a user