增加回调log

This commit is contained in:
2024-01-30 11:03:40 +08:00
parent 2005b6eefc
commit a065f5e3a5
10 changed files with 866 additions and 8 deletions
+32 -2
View File
@@ -10,7 +10,8 @@ use App\Model\UserPatient;
use App\Model\UserPharmacist;
use Extend\Alibaba\Oss;
use Extend\TencentIm\Account;
use Extend\TencentIm\Safe;
use Extend\TencentIm\Safe as ImSafe;
use Extend\TencentVideo\Safe as VideoSafe;
/**
* 安全服务
@@ -99,7 +100,36 @@ class SafeService extends BaseService
return success();
}
$safe = new Safe();
$safe = new ImSafe();
$sign = $safe->getUserSign($user['user_id']);
if (empty($sign)){
return success();
}
return success($sign);
}
/**
* 获取音视频签名数据
* @return array
*/
public function getVideoSign(): array
{
$user_info = $this->request->getAttribute("userInfo") ?? [];
if (empty($user_info)){
return success();
}
// 验证用户数据
$params = array();
$params['user_id'] = $user_info['user_id'];
$user = User::getOne($params);
if (empty($user)){
return success();
}
$safe = new VideoSafe();
$sign = $safe->getUserSign($user['user_id']);
if (empty($sign)){
return success();
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\Services;
use App\Exception\BusinessException;
use Extend\TencentVideo\Safe as VideoSafe;
class VideoService extends BaseService
{
}