Files
im/plugin/admin/app/controller/OpenimBase.php
T

34 lines
671 B
PHP
Raw Normal View History

2026-03-01 21:05:19 +08:00
<?php
namespace plugin\admin\app\controller;
use app\model\User;
use plugin\admin\app\controller\Crud;
use support\exception\BusinessException;
use support\Request;
use support\Response;
use Throwable;
/**
* OpenimBase
*/
class OpenimBase extends Crud
{
/**
* @var \support\OpenImSdk\Client
*/
protected $sdk = null;
protected function getSdk(){
if($this->sdk){
return $this->sdk;
}
$this->sdk = new \support\OpenImSdk\Client([
'host' => 'http://127.0.0.1:10002', // OpenIM API地址
'secret' => 'n1e5a6s6m7', // OpenIM密钥
]);
return $this->sdk;
}
}