diff --git a/app/api/controller/JunziqianController.php b/app/api/controller/JunziqianController.php index 084f746b..16c4d2bd 100644 --- a/app/api/controller/JunziqianController.php +++ b/app/api/controller/JunziqianController.php @@ -211,24 +211,19 @@ class JunziqianController extends BaseApiController public function downloadVehicleContractEvidence($applyNo,$companyName,$companyCode) { //构建请求工具 - $requestUtils=new RequestUtils($this->serviceUrl, $this->appkey, $this->appSecret); + $requestUtils = new RequestUtils($this->serviceUrl, $this->appkey, $this->appSecret); //初始化合同参数 - $request=array( + $request = array( "applyNo" => $applyNo, "fullName" => $companyName, //签约人名称(合同发起接口中传入的签署人姓名) "identityCard" => $companyCode, //统一社会信用代码 "identityType" => 12, //证件类型 1身份证, 2护照, 3台胞证, 4港澳居民来往内地通行证, 11营业执照, 12统一社会信用代码, 20子账号, 99其他 - "evidenceType" => 1 //证据类型,0图片,1视频,2人脸证据 + "evidenceType" => 1 ); - $response = $requestUtils->doPost("/v2/sign/evidenceLinkFile",$request); + $response = $requestUtils->doPost("/v2/sign/presLinkFile", $request); if ($response->success) { - $resData = (array)$response->data; - $resArr = []; - foreach($resData['links'] as $k=>$v){ - $this->getDownload($v,root_path() . 'public/uploads/vehicle_contract_evidence/' . $applyNo.'_'.$companyCode.'_'.$k. '.mp4'); - $resArr[] = env('project.website_domain').'/uploads/vehicle_contract_evidence/' . $applyNo.'_'.$companyCode.'_'.$k . '.mp4'; - } - return $resArr; + $this->getDownload($response->data, root_path().'public/uploads/vehicle_contract_evidence/'.$applyNo.'_'.$companyCode.'.zip'); + return env('project.website_domain').'/uploads/vehicle_contract_evidence/'.$applyNo.'_'.$companyCode.'.zip';; } else { return false; }