bianjunhui il y a 2 ans
Parent
commit
e4f6707490
1 fichiers modifiés avec 4 ajouts et 5 suppressions
  1. 4 5
      application/api/controller/Message.php

+ 4 - 5
application/api/controller/Message.php

@@ -68,13 +68,12 @@ class Message extends Api
         $notification->setIncludedSegments([$segment]);
         $data['url']='https://www.westkiss.com/';
         $data['type']=0;
-        $jsons = json($data);
         $data1['url']='https://www.baidu.com/';
         $data1['type']=2;
-        $jsons1 = json($data1);
-        $notification->setIosAttachments  ($jsons);
-        $notification->setApnsAlert  ($jsons1);
-
+        $data2=array("foo" => "bar");
+        $notification->setIosAttachments($data);
+        $notification->setApnsAlert($data1);
+        $notification->setData($data2);
         return $notification;
     }