This commit is contained in:
2023-03-16 20:04:53 +08:00
parent 5d2dc5d2c0
commit 21320b3ea4
9 changed files with 123 additions and 32 deletions
+18 -3
View File
@@ -26,14 +26,18 @@ class Ca
$this->client = $this->container->get(Client::class);
}
// 获取云证书
public function getCloudCert(array $data){
/**
* 获取云证书
* @param array $data
* @return mixed
*/
public function getCloudCert(array $data): mixed
{
$option = [
'form_params' => [
'entityId' => $data['user_id'], // 用户唯一标识,由业务系统定义
'entityType' => "Personal",// 用户类型,可选值[Personal/Organizational]
'pin' => $data['user_id'], // 证书PIN码
// 'pin' => "123", // 证书PIN码
'cardNumber' => $data['card_num'], // 证件号码(个人身份证;企业统一社会信用代码)
]
];
@@ -50,6 +54,17 @@ class Ca
}
}
// 获取云证书签名
public function getCertSign(array $data){
$option = [
'form_params' => [
'entityId' => $data['user_id'], // 用户唯一标识,由业务系统定义
'entityType' => "Personal",// 用户类型,可选值[Personal/Organizational]
'pin' => $data['user_id'], // 证书PIN码
'cardNumber' => $data['card_num'], // 证件号码(个人身份证;企业统一社会信用代码)
]
];
}
/**
* 获取签名
+2 -1
View File
@@ -4,6 +4,7 @@ namespace Extend\TencentIm;
use App\Constants\HttpEnumCode;
use App\Exception\BusinessException;
use App\Utils\Log;
use GuzzleHttp\Exception\GuzzleException;
use Hyperf\Snowflake\IdGeneratorInterface;
use Hyperf\Utils\ApplicationContext;
@@ -88,7 +89,7 @@ class Message extends Base
try {
// 合并发送参数
$arg = array_merge($this->arg,$arg);
Log::getInstance()->info(json_encode($arg,JSON_UNESCAPED_UNICODE));
$options = [
"json"=> $arg
];
+12
View File
@@ -9,6 +9,18 @@ class RecentContact extends Base
{
// 分页拉取会话列表
public function getRecentContactPage(){
$options = [
"json"=> [
"Operator_Account"=>"491925054435950592",
"Peer_Account"=>"492404831991414785",
"MaxCnt"=>50,
"MinTime"=> 1678872105,
"MaxTime"=> time(),
]
];
$path = $this->config['base_url'] . "v4/openim/admin_getroammsg?" . $this->buildRequestParams();
$result = $this->postRequest($path,$options);
dump($result);die;
}
}