|
@@ -107,10 +107,10 @@ class PushService
|
|
|
}
|
|
|
|
|
|
// 针对VIVO用户需要主动订阅topic,方便后续全量推送
|
|
|
- // if ($provider === PushConst::PROVIDER_OPPO) {
|
|
|
- // $client = new VPush($appId, $appKey, $appSecret);
|
|
|
- // $client->addTagForUsers($topic, [$regId]);
|
|
|
- // }
|
|
|
+ if ($provider === PushConst::PROVIDER_OPPO) {
|
|
|
+ $client = new VPush($appId, $appKey, $appSecret);
|
|
|
+ $client->addTagForUsers($topic, [$regId]);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 更新用户数据库中reg_id
|
|
@@ -259,7 +259,8 @@ class PushService
|
|
|
case PushConst::PROVIDER_VIVO:
|
|
|
$client = new VPush($appId, $appKey, $appSecret);
|
|
|
$client->setPushData($title, $content, $url);
|
|
|
- $result = $client->sendAll();
|
|
|
+ // $result = $client->sendAll();
|
|
|
+ $result = $client->tagPush($topic);
|
|
|
break;
|
|
|
}
|
|
|
} catch (Exception $e) {
|