1
This commit is contained in:
parent
f9e86d27b7
commit
342319d7aa
@ -266,18 +266,9 @@ class UserController extends AbstractController
|
|||||||
// // 发送消息
|
// // 发送消息
|
||||||
// $ImService->sendMessage("491925054435950592","492404831991414785","等待医生接诊","494837308861095936",1);
|
// $ImService->sendMessage("491925054435950592","492404831991414785","等待医生接诊","494837308861095936",1);
|
||||||
|
|
||||||
$Ca = new Ca();
|
|
||||||
$data = array();
|
|
||||||
$data['user_id'] = "111295";
|
|
||||||
$data['card_num'] = "410323199603261236";
|
|
||||||
|
|
||||||
$result = $Ca->getCloudCert($data);
|
|
||||||
dump($result);
|
|
||||||
|
|
||||||
|
|
||||||
$ImService = new ImService();
|
|
||||||
|
|
||||||
|
|
||||||
|
// $ImService = new ImService();
|
||||||
// // 发送消息
|
// // 发送消息
|
||||||
// 自定义消息
|
// 自定义消息
|
||||||
// $cloud_custom_data = array();
|
// $cloud_custom_data = array();
|
||||||
@ -300,26 +291,24 @@ class UserController extends AbstractController
|
|||||||
// $result = $RecentContact->getRecentContactPage();
|
// $result = $RecentContact->getRecentContactPage();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$ca = new Ca();
|
$ca = new Ca();
|
||||||
|
|
||||||
// 获取云证书
|
// 获取云证书
|
||||||
$data = array();
|
// $data = array();
|
||||||
$data['user_id'] = "491925054435950592";
|
// $data['user_id'] = "491925054435950592";
|
||||||
$data['card_num'] = "410323199603261241";
|
// $data['card_num'] = "410323199603261241";
|
||||||
$result = $ca->getCloudCert($data);
|
// $result = $ca->getCloudCert($data);
|
||||||
|
//
|
||||||
$data = array();
|
// $data = array();
|
||||||
$data['user_id'] = "491925054435950592";
|
// $data['user_id'] = "491925054435950592";
|
||||||
$data['cert_base64'] = $result['certBase64'];
|
// $data['cert_base64'] = $result['certBase64'];
|
||||||
$data['cert_chain_p7'] = $result['certP7'];
|
// $data['cert_chain_p7'] = $result['certP7'];
|
||||||
$data['cert_serial_number'] = $result['certSerialnumber'];
|
// $data['cert_serial_number'] = $result['certSerialnumber'];
|
||||||
$data['ca_pin'] = "491925054435950592";
|
// $data['ca_pin'] = "491925054435950592";
|
||||||
$doctor_pharmacist_cert = DoctorPharmacistCert::addDoctorPharmacistCert($data);
|
// $doctor_pharmacist_cert = DoctorPharmacistCert::addDoctorPharmacistCert($data);
|
||||||
if (empty($doctor_pharmacist_cert)){
|
// if (empty($doctor_pharmacist_cert)){
|
||||||
return fail();
|
// return fail();
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 获取用户云证书数据
|
// 获取用户云证书数据
|
||||||
$params = array();
|
$params = array();
|
||||||
@ -341,13 +330,22 @@ class UserController extends AbstractController
|
|||||||
$data['doctor_advice'] = "多吃药";
|
$data['doctor_advice'] = "多吃药";
|
||||||
$data['product'] = [
|
$data['product'] = [
|
||||||
[
|
[
|
||||||
"product_name" => "感冒药",
|
"product_name" => "感冒药1",
|
||||||
"product_name" => "感冒药",
|
"single_unit" => "一次一包",
|
||||||
|
"frequency_use" => "1天3次",
|
||||||
|
"single_use" => "口服",
|
||||||
|
"prescription_product_num" => "X1盒",
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"product_name" => "感冒药2",
|
||||||
|
"single_unit" => "一次一包",
|
||||||
|
"frequency_use" => "1天3次",
|
||||||
|
"single_use" => "口服",
|
||||||
|
"prescription_product_num" => "X1盒",
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$result = $ca->getCertSign("491925054435950592","491925054435950592",$data);
|
||||||
$result = $ca->getCertSign($data);
|
dump($result);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -121,7 +121,6 @@ class UserPatientService extends BaseService
|
|||||||
'patient_id',
|
'patient_id',
|
||||||
'user_id',
|
'user_id',
|
||||||
'user_name',
|
'user_name',
|
||||||
'mobile',
|
|
||||||
'avatar',
|
'avatar',
|
||||||
];
|
];
|
||||||
$params = array();
|
$params = array();
|
||||||
|
|||||||
@ -56,16 +56,18 @@ class Ca
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取云证书签名
|
* 获取云证书签名
|
||||||
|
* @param string $user_id
|
||||||
|
* @param string $pin
|
||||||
* @param array $data
|
* @param array $data
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function getCertSign(array $data): mixed
|
public function getCertSign(string $user_id,string $pin,array $data): mixed
|
||||||
{
|
{
|
||||||
$option = [
|
$option = [
|
||||||
'form_params' => [
|
'form_params' => [
|
||||||
'entityId' => $data['user_id'], // 用户唯一标识,由业务系统定义
|
'entityId' => $user_id, // 用户唯一标识,由业务系统定义
|
||||||
'toSign' => $this->getRequestSign($data),
|
'toSign' => json_encode($data,JSON_UNESCAPED_UNICODE),
|
||||||
'pin' => $data['user_id'], // 证书PIN码
|
'pin' => $pin, // 证书PIN码
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user