去除基廷成员验证
This commit is contained in:
@@ -115,6 +115,73 @@ class Ca
|
||||
throw new BusinessException($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加签章配置
|
||||
* @param string $user_id 用户id
|
||||
* @param string $card_num 身份证号
|
||||
* @param array $data
|
||||
* @return mixed
|
||||
*/
|
||||
public function addUserSignConfig(string $user_id,string $card_num,array $data): mixed
|
||||
{
|
||||
$option = [
|
||||
'form_params' => [
|
||||
'userId' => $user_id,//用户标识信息(为云证书entityId)
|
||||
'configKey' => $user_id, // 签章配置唯一标识,一张云证书配置一个
|
||||
'keypairType' => "3", // 秘钥类型(3云证书)
|
||||
'certSn' => $card_num, // 证书序列号,使用医生身份证号即可
|
||||
'signType' => "4", // 签章方式(签章类型; 4客户端坐标签章;5客户端关键字签章;)
|
||||
'signParam' => $data['sign_param'], // 签章配置,JSON
|
||||
'sealImg' => $data['seal_img'], // 签章图片,base64格式
|
||||
'sealType' => "4",
|
||||
'signTemplate' => "1",
|
||||
]
|
||||
];
|
||||
|
||||
try {
|
||||
$response = $this->httpRequest(
|
||||
config("ca.api_url") . '/signature-server/api/open/signature/userSignConfig',
|
||||
$option
|
||||
);
|
||||
if (empty($response)){
|
||||
// 返回值为空
|
||||
throw new BusinessException(HttpEnumCode::getMessage(HttpEnumCode::SERVER_ERROR));
|
||||
}
|
||||
return $response;
|
||||
} catch (GuzzleException $e) {
|
||||
throw new BusinessException($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户签章图片
|
||||
* @param string $user_id
|
||||
* @return mixed
|
||||
*/
|
||||
public function getFetchUserSeal(string $user_id): mixed
|
||||
{
|
||||
$option = [
|
||||
'form_params' => [
|
||||
'userId' => $user_id,//用户标识信息(为云证书entityId)
|
||||
]
|
||||
];
|
||||
|
||||
try {
|
||||
$response = $this->httpRequest(
|
||||
config("ca.api_url") . '/signature-server/api/open/signature/fetchUserSeal',
|
||||
$option
|
||||
);
|
||||
if (empty($response)){
|
||||
// 返回值为空
|
||||
throw new BusinessException(HttpEnumCode::getMessage(HttpEnumCode::SERVER_ERROR));
|
||||
}
|
||||
return $response;
|
||||
} catch (GuzzleException $e) {
|
||||
throw new BusinessException($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取请求签名
|
||||
* @param array $data
|
||||
|
||||
Reference in New Issue
Block a user