Skip to content

Commit 151a127

Browse files
committed
edit README.MD
1 parent d9b4606 commit 151a127

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ bin/
88
.buildpath
99
.project
1010
.settings/
11+
.idea

.idea/workspace.xml

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ phpunit AllTest.php
4949

5050
```php
5151
//发送广播通知
52-
$client = new JPushClient($app_key, $master_secret);
53-
$payload = new PushClient();
54-
$notification = new Notification();
55-
$notification->alert = "alert message";
56-
$result1 = $client->sendPush($payload);
52+
$payload1 = new PushPayload();
53+
$notification1 = new Notification();
54+
$notification1->alert = "alert message";
55+
$payload1->notification = $notification;
56+
$result1 = $client->sendPush($payload1);
5757
```
5858

5959

examples/example.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,14 @@
8282

8383
/* init end */
8484

85-
$payload = new PushClient();
86-
$notification = new Notification();
87-
$notification->alert = "alert message";
85+
86+
8887

8988

9089
//发送广播通知
9190
$payload1 = new PushPayload();
91+
$notification1 = new Notification();
92+
$notification1->alert = "alert message";
9293
$payload1->notification = $notification;
9394
$result1 = $client->sendPush($payload1);
9495

0 commit comments

Comments
 (0)