We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/jpush/jpush-api-php-client/blob/master/src/JPush/PushPayload.php
"options": { "third_party_channel": { "vivo": { "distribution": "ospush", "classification": 1//可选,int 类型,2020/06 新增,和vivo官方字段含义一致 0 代表运营消息,1 代表系统消息,不填vivo官方默认为0 } } }
https://go48pg.yuque.com/docs/share/83fb8f80-1edb-48ca-8e4a-df8a45d82c6b?#
public function options(array $opts = array()) { # $required_keys = array('sendno', 'time_to_live', 'override_msg_id', 'apns_production', 'apns_collapse_id', 'big_push_duration'); $options = array(); ...//省略 if (isset($opts['big_push_duration']) && $opts['big_push_duration'] <= 1400 && $opts['big_push_duration'] >= 0) { $options['big_push_duration'] = $opts['big_push_duration']; } //第三方厂商通道参数 if (isset($opts['third_party_channel'])) { $options['third_party_channel'] = $opts['third_party_channel']; } $this->options = $options; return $this; }
$options = array( 'apns_production' => env('JPUSH_APNS_PRODUCTION', false), 'third_party_channel' => [ 'vivo' => [ 'distribution' => 'ospush', 'classification' => 1//可选,int 类型,2020/06 新增,和vivo官方字段含义一致 0 代表运营消息,1 代表系统消息,不填vivo官方默认为0 ] ]//https://go48pg.yuque.com/docs/share/83fb8f80-1edb-48ca-8e4a-df8a45d82c6b?# ); try{ $response = $push->setCid($cid) ->setPlatform (['android', 'ios']) ->addRegistrationId($audience) ->iosNotification($iosAlert, $ios_notification) ->androidNotification($androidAlert, $android_notification) ->options($options) ->send(); }catch(\JPush\Exceptions\JPushException $e){ $result = array( 'code' => $e->getCode(), 'message' => $e->getMessage(), ); return $result; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
options里面没有加上third_party_channel参数的判断,导致vivo厂商通道的参数无法加入
https://go48pg.yuque.com/docs/share/83fb8f80-1edb-48ca-8e4a-df8a45d82c6b?#
应修改为
调用为
The text was updated successfully, but these errors were encountered: