xiaogang 3 роки тому
батько
коміт
697dcf5ded
1 змінених файлів з 13 додано та 9 видалено
  1. 13 9
      app/Http/Controllers/Api/TestController.php

+ 13 - 9
app/Http/Controllers/Api/TestController.php

xqd xqd
@@ -9,6 +9,7 @@ use App\Models\User;
 use App\Models\UserInfoModel;
 use App\Services\JPushService;
 use App\Services\TencentImAccountService;
+use App\Services\TencentImFriendService;
 use Illuminate\Support\Facades\Storage;
 use PHPUnit\Util\Exception;
 
@@ -112,17 +113,20 @@ class TestController
 
     public function jg_auth(){
 
-       $tencent = new TencentImAccountService();
-       $arr = array();
-        for ($i=1;$i<100;$i++){
-            $ar = array();
-            $ar['UserID'] = 'IM_USER_TEST_'.$i;
-            $arr[]=json_encode($ar);
-        }
-        $res = $tencent->accountDelete($arr);
+//       $tencent = new TencentImAccountService();
+//       $arr = array();
+//        for ($i=1;$i<100;$i++){
+//            $ar = array();
+//            $ar['UserID'] = 'IM_USER_TEST_'.$i;
+//            $arr[]=json_encode($ar);
+//        }
+//        $res = $tencent->accountDelete($arr);
+//        dd($res);
+
+        $tencent = new TencentImFriendService();
+       $res = $tencent->friendAddItem('IM_USER_TEST_7','IM_USER_TEST_13');
         dd($res);
 
-
         dd(GetDistance(30.720518,103.998353,30.721384,103.996072));
 
         die;