增加回调log
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Exception\BusinessException;
|
||||
use Extend\TencentVideo\Safe as VideoSafe;
|
||||
|
||||
class VideoService extends BaseService
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user