代码拉取完成,页面将自动刷新
$config = (new \Getui\Config())->
setAppId('llUBYSt12xg2mPbnOh6')->
setAppKey('wP31m7pz12DVFmkHq9F6')->
setMasterSecret('qMyiA12qJ912auukl4Hf8');
$cache = new Doctrine\Common\Cache\RedisCache();
$redis = new \Redis();
$redis->connect('172.26.224.178',6379,5);
$cache->setRedis($redis);
$authorization = (new \Getui\Authorization($config))->withCacheDriver($cache);
(new \Getui\User())->withConfig($config)->withAuth($authorization)->aliasBind([
[
'cid'=>'ad9555f3c980cb0fe20de584ab9f0e3a',
'alias'=>'15093570968'
]
]);
$alias = (new \Getui\User())->
withConfig($config)->
withAuth($authorization)->
getAliasByClientId('ad9555f3c980cb0fe20de584ab9f0e3a');
var_dump($alias);
(new \Getui\Push())->withConfig($config)->withAuth($authorization)->toSingleCid([
'ad9555f3c980cb0fe20de584ab9f0e3a'
],(new \Getui\Message\NotificationMessage())->
setTitle('测1试32')->
setBody('订单已2经支3付1成功')->
setClickType('payload')->
setPayload([
'jump_type'=>99,
'jump_value'=>111
]));
(new \Getui\Push())->withConfig($config)->withAuth($authorization)->toSingleAlias([
'15093570968'
],(new \Getui\Message\NotificationMessage())->
setTitle('测试12')->
setBody('订单s已2经支3付1成功')->
setClickType('payload')->
setPayload([
'jump_type'=>91,
'jump_value'=>111
]));
(new \Getui\Push())->withConfig($config)->withAuth($authorization)->toAll((new \Getui\Message\NotificationMessage())->
setTitle('测试2订单')->
setBody('全局2推送')->
setClickType('payload')->
setPayload([
'jump_type'=>2,
'jump_value'=>"id=1"
]));
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。