1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
namespace App\Http\Manager;
use App\Utils\HttpRequestTool;
use RuntimeException;
class HttpChannelSdkManager
{
/** @var HttpRequestTool */
private $httpMg;
public function __construct()
{
$channelSdkHost = '';
$this->httpMg = new HttpRequestTool($channelSdkHost);
}
/**
* 获取用户信息
*
* @return mixed
*/
public function getUserInfo()
{
$uri = '/api/TemporaryQrCode/statisticsByToken';
// $data = ['link' => $idAndToken, 'wxh' => $serviceName, 'start_at' => $beginTime, 'end_at' => $endTime];
$data = [];
$responseData = $this->httpMg->requestByJson('POST', $uri, $data);
if (0 !== (int)$responseData['code']) {
throw new RuntimeException($responseData['msg']);
}
return $responseData['data'];
}
}