企微短剧业务系统

CorpClientService.php 648B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace App\Service;
  3. use App\Log;
  4. class CorpClientService
  5. {
  6. const CLIENT_BASE_URI = 'http://182.92.2.149:';
  7. /**
  8. * 获取账号群信息
  9. * */
  10. public static function getChatGroupData($port)
  11. {
  12. $requestUri = CorpClientService::CLIENT_BASE_URI . $port .'/?api=2103';
  13. $response = HttpService::httpGet($requestUri);
  14. Log::logInfo('本次客户端返回的群信息', ['uri' => $requestUri, 'response' => $response], 'CorpClientChatGroupData');
  15. $responseData = json_decode($response, true);
  16. $chatGroupData = $responseData['data'] ?? [];
  17. return $chatGroupData;
  18. }
  19. }