wupengfei 2 年之前
父节点
当前提交
632e442e35
共有 2 个文件被更改,包括 4 次插入3 次删除
  1. 1 1
      .idea/workspace.xml
  2. 3 2
      application/api/controller/Easemob.php

+ 1 - 1
.idea/workspace.xml

@@ -176,7 +176,7 @@
       <workItem from="1666313182769" duration="19043000" />
       <workItem from="1668041658444" duration="593000" />
       <workItem from="1668042326649" duration="24523000" />
-      <workItem from="1668212914124" duration="16275000" />
+      <workItem from="1668212914124" duration="16629000" />
     </task>
     <servers />
   </component>

+ 3 - 2
application/api/controller/Easemob.php

@@ -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);