From 0f54f56a4d23a12eecdc514b4f901c249c3e88f4 Mon Sep 17 00:00:00 2001 From: unknown <736250432@qq.com> Date: Fri, 8 Sep 2023 19:18:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=AD=BE=E7=BA=A6=E8=AF=81?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/IndexController.php | 7 ++++++- app/api/controller/JunziqianController.php | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/app/api/controller/IndexController.php b/app/api/controller/IndexController.php index 1fc38031a..5798b04be 100755 --- a/app/api/controller/IndexController.php +++ b/app/api/controller/IndexController.php @@ -32,7 +32,7 @@ use think\response\Json; */ class IndexController extends BaseApiController { - public array $notNeedLogin = ['index', 'config', 'policy', 'decorate', 'notifyUrl', 'notifyProperty', 'notifyAuthentication', 'notifyVehicleContractUpdate', 'systemCarRent', 'selfCarRent', 'cancelRent']; + public array $notNeedLogin = ['test','index', 'config', 'policy', 'decorate', 'notifyUrl', 'notifyProperty', 'notifyAuthentication', 'notifyVehicleContractUpdate', 'systemCarRent', 'selfCarRent', 'cancelRent']; /** * @notes 首页数据 @@ -49,6 +49,11 @@ class IndexController extends BaseApiController return $this->data($result); } + public function test() { + $res = app(JunziqianController::class)->downloadVehicleContractEvidence('APL1699006920226521088','泸县供投里海农业科技有限公司','91510521MAC477XA13'); + dump($res); + } + /** * @notes 全局配置 diff --git a/app/api/controller/JunziqianController.php b/app/api/controller/JunziqianController.php index 8b571e3c9..3cd3c1bfe 100644 --- a/app/api/controller/JunziqianController.php +++ b/app/api/controller/JunziqianController.php @@ -216,6 +216,27 @@ class JunziqianController extends BaseApiController } } + public function downloadVehicleContractEvidence($applyNo,$companyName,$companyCode) { + //构建请求工具 + $requestUtils=new RequestUtils($this->serviceUrl, $this->appkey, $this->appSecret); + //初始化合同参数 + $request=array( + "applyNo" => $applyNo, + "fullName" => $companyName, //签约人名称(合同发起接口中传入的签署人姓名) + "identityCard" => $companyCode, //统一社会信用代码 + "identityType" => 12, //证件类型 1身份证, 2护照, 3台胞证, 4港澳居民来往内地通行证, 11营业执照, 12统一社会信用代码, 20子账号, 99其他 + "evidenceType" => 0 //证据类型,0图片,1视频,2人脸证据 + ); + $response = $requestUtils->doPost("/v2/sign/evidenceLinkFile",$request); + if ($response->success) { + $resData = (array)$response->data; + $this->getDownload($resData['link'], root_path() . 'public/uploads/vehicle_contract/' . $applyNo . '.png'); + return env('project.website_domain').'/uploads/vehicle_contract/' . $applyNo . '.png'; + } else { + return false; + } + } + public function SigningLink($data) { //构建请求工具