Skip to content

Commit 8817ba8

Browse files
committed
批量单推相关代码问题
1 parent 9336716 commit 8817ba8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/JPush/PushPayload.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,7 @@ public function options(array $opts = array()) {
482482
if (isset($opts['big_push_duration']) && $opts['big_push_duration'] <= 1400 && $opts['big_push_duration'] >= 0) {
483483
$options['big_push_duration'] = $opts['big_push_duration'];
484484
}
485+
$options = array_merge($opts, $options);
485486
$this->options = $options;
486487

487488
return $this;
@@ -695,7 +696,7 @@ public function setOptions($sendno=null, $time_to_live=null, $override_msg_id=nu
695696
*/
696697
public function batchPushByRegid(array $singlePayloads) {
697698
$body = array(
698-
"pushlist": array()
699+
"pushlist"=>array()
699700
);
700701
$response = $this -> getCid(count($singlePayloads), 'push');
701702
$cidlist = $response['body']['cidlist'];
@@ -712,14 +713,14 @@ public function batchPushByRegid(array $singlePayloads) {
712713
*/
713714
public function batchPushByAlias(array $singlePayloads) {
714715
$body = array(
715-
"pushlist": array()
716+
"pushlist"=>array()
716717
);
717718
$response = $this -> getCid(count($singlePayloads), 'push');
718719
$cidlist = $response['body']['cidlist'];
719720
foreach ($cidlist as $i => $cid) {
720721
$body["pushlist"][$cid] = $singlePayloads[$i];
721722
}
722-
$url = $this->client->makeURL('push') . 'push/batch/regid/alias';
723+
$url = $this->client->makeURL('push') . 'push/batch/alias/single';
723724
return Http::post($this->client, $url, $body);
724725
}
725726
}

0 commit comments

Comments
 (0)