From f8c6ce0352d78e58fadaae729f5cda9fe1d89ab2 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 25 Aug 2023 15:09:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/JunziqianController.php | 28 +++------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/app/api/controller/JunziqianController.php b/app/api/controller/JunziqianController.php index 72bd49977..c4d51ec8c 100644 --- a/app/api/controller/JunziqianController.php +++ b/app/api/controller/JunziqianController.php @@ -13,7 +13,7 @@ use think\facade\Db; class JunziqianController extends BaseApiController { - public array $notNeedLogin = ['index', 'download_file']; + public array $notNeedLogin = ['download_file']; /**请求地址*/ private $serviceUrl = 'https://api.sandbox.junziqian.com'; @@ -22,20 +22,10 @@ class JunziqianController extends BaseApiController /**secret*/ private $appSecret = '1e66d8b73121e0d911b7943d82bba174'; - /**默认加密方式:不输入使用sha256,其它可选择项md5,sha1,sha3-256*/ private $encryMethod; /**默认ts单位:1毫秒,2秒*/ private $tsType; - - public function index() - { - $data = [ - 'name' => '我的合同', - 'signatories' => [['fullName' => '小米', 'identityType' => 1, 'identityCard' => '5002401XXXXXXXXX', 'mobile' => 18982406440, 'noNeedVerify' => 1, 'signLevel' => 1]], - 'url' => "https://dev.lihaink.cn/storage/202307/acbba88e77392348d3a8a4a1fdf210f1.pdf" - ]; - } /** * 填充签名数据 * @param $req array @@ -74,8 +64,6 @@ class JunziqianController extends BaseApiController public function EnterpriseCertification($data) { $requestUtils = new RequestUtils($this->serviceUrl, $this->appkey, $this->appSecret); - //CURLFile 可以传url或filePath,但必须保证文件存在且有效,否则php不会报错,只会导致http请求返回null(并没有调到服务端)。 - //初始化合同参数 $request = new OrganizationCreateReq(); $request->name = $data['name']; $request->identificationType = 1; //证件类型:0多证,1多证合一 @@ -87,19 +75,15 @@ class JunziqianController extends BaseApiController $request->emailOrMobile = $data['master_email']; //邮箱 } $request->notifyUrl = 'https://worker-task.lihaink.cn/notify_authentication?id=' . $data['id']; - // $request->emailOrMobile = ; //邮箱 //发起创建企业请求 $response = $requestUtils->doPost("/v2/user/organizationCreate", $request); return $response; - // return $this->success('', (array)$response); } //重新提交企业实名认证 public function organizationReapply($data) { $requestUtils = new RequestUtils($this->serviceUrl, $this->appkey, $this->appSecret); - //CURLFile 可以传url或filePath,但必须保证文件存在且有效,否则php不会报错,只会导致http请求返回null(并没有调到服务端)。 - //初始化合同参数 $request = new OrganizationCreateReq(); $request->name = $data['name']; $request->identificationType = 1; //证件类型:0多证,1多证合一 @@ -121,11 +105,11 @@ class JunziqianController extends BaseApiController $requestUtils = new RequestUtils($this->serviceUrl, $this->appkey, $this->appSecret); //初始化合同参数 $request = array( - "emailOrMobile" => $param['email'], //TODO * + "emailOrMobile" => $param['master_email'], //TODO * ); //发起请求 $response = $requestUtils->doPost("/v2/user/organizationAuditStatus", $request); - return $this->success('', (array)$response); + return $response; } //企业自定义公章 @@ -145,9 +129,6 @@ class JunziqianController extends BaseApiController public function Signing($data, $id) { $requestUtils = new RequestUtils($this->serviceUrl, $this->appkey, $this->appSecret); - //CURLFile 可以传url或filePath,但必须保证文件存在且有效,否则php不会报错,只会导致http请求返回null(并没有调到服务端)。 - //初始化合同参数 - //[ ['fullName' => '小米', 'identityType' => 1, 'identityCard' => '5002401XXXXXXXXX', 'mobile' => 18982406440,'noNeedVerify'=>1,'signLevel'=>1] ] $request = new ApplySignReq(); $request->contractName = $data['name']; $request->signatories = $data['signatories']; //签约方 @@ -160,7 +141,6 @@ class JunziqianController extends BaseApiController // halt($request); $response = $requestUtils->doPost("/v2/sign/applySign", $request); return $response; - // return $this->success('', (array)$response); } public function SigningLink($data) @@ -170,8 +150,6 @@ class JunziqianController extends BaseApiController //初始化合同参数 $response = $requestUtils->doPost("/v2/sign/link", $data); return $response; - - // return $this->success('', (array)$response); } public function sms($data)