|
@@ -32,7 +32,8 @@ class Easemob{
|
|
|
$this->org_name = isset ( $options ['org_name'] ) ? $options ['org_name'] : config('org_name');
|
|
|
$this->app_name = isset ( $options ['app_name'] ) ? $options ['app_name'] : config('app_name');
|
|
|
if (! empty ( $this->org_name ) && ! empty ( $this->app_name )) {
|
|
|
- $this->url = 'https://a1.easemob.com/' . $this->org_name . '/' . $this->app_name . '/';
|
|
|
+ //$this->url = 'https://a1.easemob.com/' . $this->org_name . '/' . $this->app_name . '/';
|
|
|
+ $this->url = 'http://kefu.easemob.com/api/platform/tenants/104968/';
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
@@ -49,7 +50,7 @@ class Easemob{
|
|
|
//json_encode()函数,可将PHP数组或对象转成json字符串,使用json_decode()函数,可以将json字符串转换为PHP数组或对象
|
|
|
$body=json_encode($options);
|
|
|
//使用 $GLOBALS 替代 global
|
|
|
- $url=$this->url.'token';
|
|
|
+ $url=$this->url.'accessToken';
|
|
|
//$url=$base_url.'token';
|
|
|
$tokenResult = $this->postCurl($url,$body,$header=array());
|
|
|
var_dump($tokenResult);
|