16
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user