...
|
...
|
@@ -2198,17 +2198,16 @@ class CommonController extends RestBaseController |
|
|
* $title:标题
|
|
|
* $extras:推送附加参数array()
|
|
|
*/
|
|
|
public function pushMessage($alias,$content,$title,$extras){
|
|
|
public function pushMessage($registration_id,$content,$title){
|
|
|
$app_key = config('site.app_key');
|
|
|
$master_secret = config('site.master_secret');
|
|
|
$client = new JPush($app_key, $master_secret);
|
|
|
$result = $client->push()
|
|
|
->setPlatform('all')
|
|
|
->addAllAudience()
|
|
|
->addAlias($alias)
|
|
|
->setMessage($content, $title,'text',$extras)
|
|
|
->addAndroidNotification($content,$title,1,$extras)
|
|
|
->addIosNotification($content, 'iOS sound', '+1', true, 'iOS category',$extras)
|
|
|
->addRegistrationId($registration_id)
|
|
|
->setMessage($content, $title,'text')
|
|
|
->addAndroidNotification($content,$title,1)
|
|
|
->addIosNotification($content, 'iOS sound', '+1', true, 'iOS category')
|
|
|
->send();
|
|
|
return $result;
|
|
|
}
|
...
|
...
|
|