|
|
@ -195,7 +195,32 @@ class Index extends BaseController |
|
|
'groupIds' => array_unique($groupIds) |
|
|
'groupIds' => array_unique($groupIds) |
|
|
] |
|
|
] |
|
|
]; |
|
|
]; |
|
|
return json_encode(); |
|
|
return json_encode($returnArr); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 查询最新客流统计组实时数据 |
|
|
|
|
|
* @return void |
|
|
|
|
|
*/ |
|
|
|
|
|
public function realTimeData() { |
|
|
|
|
|
$config = config('app'); |
|
|
|
|
|
$url = $config['host_url'] . "/api/cfas/v3/passenger/realTime"; |
|
|
|
|
|
$dataArr = [ |
|
|
|
|
|
'01' // --- <replace> --- // |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
$json_data = json_encode($dataArr); |
|
|
|
|
|
$result = postToken($url,$json_data,false,[],'rqhzG171BROnwBhhcZJJDudZ4vdvC3nm'); |
|
|
|
|
|
|
|
|
|
|
|
$res_data = json_decode($result,true); |
|
|
|
|
|
|
|
|
|
|
|
if ($res_data['code'] != 0) return json_encode(['code' => 403, 'msg' => $res_data['msg']]); |
|
|
|
|
|
$returnData = []; |
|
|
|
|
|
|
|
|
|
|
|
foreach ($res_data['data'] as $value) { |
|
|
|
|
|
$returnData[$value['regionId']] = $value['allEnter']; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return json_encode(['code' => 0, 'msg' => '成功', 'data' => $returnData]); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|