update
This commit is contained in:
parent
469ddda7e6
commit
186f01ba33
@ -31,8 +31,6 @@ class IndexController extends BaseApiController
|
|||||||
{
|
{
|
||||||
public array $notNeedLogin = ['index', 'config', 'policy', 'decorate','notifyUrl'];
|
public array $notNeedLogin = ['index', 'config', 'policy', 'decorate','notifyUrl'];
|
||||||
|
|
||||||
private $domain = 'https://worker-task.lihaink.cn';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 首页数据
|
* @notes 首页数据
|
||||||
* @return Json
|
* @return Json
|
||||||
@ -110,7 +108,7 @@ class IndexController extends BaseApiController
|
|||||||
//更新本地合同状态
|
//更新本地合同状态
|
||||||
$updateLocalRes = Contract::where('id',$contract['id'])->update(['signing_timer'=>1]);
|
$updateLocalRes = Contract::where('id',$contract['id'])->update(['signing_timer'=>1]);
|
||||||
//更新远程
|
//更新远程
|
||||||
$updateSverRes =curl_post($this->domain.'/api/index/notifyVehicleContractUpdate',[],[
|
$updateSverRes =curl_post(env('project.website_domain').'/api/index/notifyVehicleContractUpdate',[],[
|
||||||
'contract_logistic_id' => $contract['id'],
|
'contract_logistic_id' => $contract['id'],
|
||||||
'signing_timer' => 1,
|
'signing_timer' => 1,
|
||||||
]);
|
]);
|
||||||
@ -141,7 +139,7 @@ class IndexController extends BaseApiController
|
|||||||
}
|
}
|
||||||
$vehicleRent = new VehicleRent();
|
$vehicleRent = new VehicleRent();
|
||||||
$vehicleRent -> saveAll($data);
|
$vehicleRent -> saveAll($data);
|
||||||
curl_post($this->domain.'/api/index/notifyVehicleContractUpdate',[],[
|
curl_post(env('project.website_domain').'/api/index/notifyVehicleContractUpdate',[],[
|
||||||
'contract_logistic_id' => $contract['id'],
|
'contract_logistic_id' => $contract['id'],
|
||||||
'signing_timer' => 2,
|
'signing_timer' => 2,
|
||||||
'status' => 3
|
'status' => 3
|
||||||
|
@ -27,8 +27,6 @@ class JunziqianController extends BaseApiController
|
|||||||
/**默认ts单位:1毫秒,2秒*/
|
/**默认ts单位:1毫秒,2秒*/
|
||||||
private $tsType;
|
private $tsType;
|
||||||
|
|
||||||
private $domain = 'https://ceshi-logistics.lihaink.cn';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 填充签名数据
|
* 填充签名数据
|
||||||
* @param $req array
|
* @param $req array
|
||||||
@ -77,7 +75,7 @@ class JunziqianController extends BaseApiController
|
|||||||
if (isset($data['master_email'])) {
|
if (isset($data['master_email'])) {
|
||||||
$request->emailOrMobile = $data['master_email']; //邮箱
|
$request->emailOrMobile = $data['master_email']; //邮箱
|
||||||
}
|
}
|
||||||
$request->notifyUrl = 'https://worker-task.lihaink.cn/notify_authentication?id=' . $data['id'];
|
$request->notifyUrl = env('project.notify_domain').'/notify_authentication?id=' . $data['id'];
|
||||||
//发起创建企业请求
|
//发起创建企业请求
|
||||||
$response = $requestUtils->doPost("/v2/user/organizationCreate", $request);
|
$response = $requestUtils->doPost("/v2/user/organizationCreate", $request);
|
||||||
return $response;
|
return $response;
|
||||||
@ -138,7 +136,7 @@ class JunziqianController extends BaseApiController
|
|||||||
$request->serverCa = 1; //是否需要服务端云证书
|
$request->serverCa = 1; //是否需要服务端云证书
|
||||||
$request->fileType = 1; //合同上传方式 url
|
$request->fileType = 1; //合同上传方式 url
|
||||||
$request->url = $data['url'];
|
$request->url = $data['url'];
|
||||||
$request->notifyUrl = $this->domain.'/api/index/notifyUrl?id='.$id;
|
$request->notifyUrl = env('project.website_domain').'/api/index/notifyUrl?id='.$id;
|
||||||
$request->needQifengSign = 1;
|
$request->needQifengSign = 1;
|
||||||
//发起PING请求
|
//发起PING请求
|
||||||
// halt($request);
|
// halt($request);
|
||||||
@ -183,7 +181,7 @@ class JunziqianController extends BaseApiController
|
|||||||
$request->serverCa = 1; //是否需要服务端云证书
|
$request->serverCa = 1; //是否需要服务端云证书
|
||||||
$request->fileType = 3;
|
$request->fileType = 3;
|
||||||
$request->htmlContent = $data['content'];
|
$request->htmlContent = $data['content'];
|
||||||
$request->notifyUrl = $this->domain.'/api/index/notifyUrl?id='.$id;
|
$request->notifyUrl = env('project.website_domain').'/api/index/notifyUrl?id='.$id;
|
||||||
$request->needQifengSign = 1;
|
$request->needQifengSign = 1;
|
||||||
|
|
||||||
//发起PING请求
|
//发起PING请求
|
||||||
@ -196,7 +194,7 @@ class JunziqianController extends BaseApiController
|
|||||||
$requestUtils = new RequestUtils($this->serviceUrl, $this->appkey, $this->appSecret);
|
$requestUtils = new RequestUtils($this->serviceUrl, $this->appkey, $this->appSecret);
|
||||||
$find = Db::name('contract')->where('contract_no', $applyNo)->value('contract_url');
|
$find = Db::name('contract')->where('contract_no', $applyNo)->value('contract_url');
|
||||||
if ($find) {
|
if ($find) {
|
||||||
return $this->success('获取成功', ['url' => 'https://worker-task.lihaink.cn' . $find]);
|
return $this->success('获取成功', ['url' => env('project.notify_domain').$find]);
|
||||||
}
|
}
|
||||||
//初始化请求参数
|
//初始化请求参数
|
||||||
$request = array(
|
$request = array(
|
||||||
@ -206,7 +204,7 @@ class JunziqianController extends BaseApiController
|
|||||||
if ($response->success == true) {
|
if ($response->success == true) {
|
||||||
$this->getDownload($response->data, root_path() . 'public/uploads/contract/' . $applyNo . '.pdf');
|
$this->getDownload($response->data, root_path() . 'public/uploads/contract/' . $applyNo . '.pdf');
|
||||||
Db::name('contract')->where('contract_no', $applyNo)->update(['contract_url' => '/uploads/contract/' . $applyNo . '.pdf']);
|
Db::name('contract')->where('contract_no', $applyNo)->update(['contract_url' => '/uploads/contract/' . $applyNo . '.pdf']);
|
||||||
return $this->success('获取成功', ['url' => 'https://worker-task.lihaink.cn/uploads/contract/' . $applyNo . '.pdf']);
|
return $this->success('获取成功', ['url' => env('project.notify_domain').$applyNo . '.pdf']);
|
||||||
} else {
|
} else {
|
||||||
return $this->fail('获取失败');
|
return $this->fail('获取失败');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user