lizhen_gitee 1 year ago
parent
commit
f11be698d3
2 changed files with 5 additions and 5 deletions
  1. 4 4
      application/common/library/Easemob.php
  2. 1 1
      vendor/maniac/easemob-php/src/Push.php

+ 4 - 4
application/common/library/Easemob.php

@@ -27,9 +27,9 @@ class Easemob {
         $pushMessage =
         [
             'title'=> $title,
-            'subTitle'=> '',
+//            'subTitle'=> '',
             'content'=> $msg,
-            'ext'=> [],
+            /*'ext'=> [],
             'config'=> [
                 'clickAction'=> [
                     'url'=>'',
@@ -51,10 +51,10 @@ class Easemob {
             'oppo'=> [],
             'vivo'=> [],
             'xiaomi'=> [],
-            'honor'=>[]
+            'honor'=>[]*/
         ];
 
-        $rs = $message->push_sync($uid,json_encode($pushMessage));
+        $rs = $message->push_sync($uid,$pushMessage);
         //dump($rs);
     }
 

+ 1 - 1
vendor/maniac/easemob-php/src/Push.php

@@ -39,7 +39,7 @@ final class Push
         $header['Content-Type'] =  'application/json';
 
         $resp = Http::post($uri, $body, $header);
-        dump($resp);
+
         if (!$resp->ok()) {
             return \Easemob\error($resp);
         }