| xqd
@@ -23,7 +23,7 @@ trait JpushHelper
|
|
|
if($user&&$user->jpush){
|
|
|
$regId = array($user->jpush);
|
|
|
$options = array(
|
|
|
- 'apns_production' => true,
|
|
|
+ 'apns_production' => false,
|
|
|
);
|
|
|
try {
|
|
|
$pusher = $client->push();
|
| xqd
@@ -35,16 +35,16 @@ trait JpushHelper
|
|
|
'title' => $content,
|
|
|
'content_type' => 'text',
|
|
|
'extras' => [
|
|
|
- 'type' => 1,
|
|
|
- 'id' => 2,
|
|
|
+ 'type' => $type,
|
|
|
+ 'id' => $id,
|
|
|
]
|
|
|
]);
|
|
|
$pusher->iosNotification($title, [
|
|
|
'sound' => 'sound',
|
|
|
'badge' => '+1',
|
|
|
'extras' => [
|
|
|
- 'type' => 1,
|
|
|
- 'id' => 2,
|
|
|
+ 'type' => $type,
|
|
|
+ 'id' => $id,
|
|
|
]
|
|
|
]);
|
|
|
}
|