bianjunhui 2 년 전
부모
커밋
e4f6707490
1개의 변경된 파일4개의 추가작업 그리고 5개의 파일을 삭제
  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;
     }