dev-master
9999999-devumengpush
MIT
The Requires
by daidai
extension yii2
0.2.2
0.2.2.0umengpush
MIT
The Requires
by daidai
extension yii2
Wallogit.com
2017 © Pedro Peláez
umengpush
友盟推送, (*1)
The preferred way to install this extension is through composer., (*2)
composer require daidai118/yii2-umengpush
to the require section of your composer.json file., (*3)
Once the extension is installed, simply use it in your code by : 追加到components中, (*4)
'push'=>[ 'class' => 'daidai118\umengpush\Umeng', 'appkey'=>'xxxx', 'secret'=>'xxxx', 'alias_type'=>'fs', 'production'=>false, ],
往ios发送别名消息 默认为安卓, (*5)
Yii::$app->pushios->setStyle(Umeng::Ios)->customNotification('fs2',[
'ticker'=>'abcdef',
'title'=>'abcdef!',
'text'=>'a什么鬼'.date("h:i:s"),
]);
Yii::$app->pushios->customNotification('fs2',[
'ticker'=>'abcdef',
'title'=>'abcdef!',
'text'=>'a什么鬼'.date("h:i:s"),
]);
广播消息, (*6)
Yii::$app->push->broadcastNotification([
'ticker'=>'abcdef',
'title'=>'abcdef!',
'text'=>'a什么鬼'.date("h:i:s"),
]);
按照设备推送, (*7)
Yii::$app->push->sendNotificationToDevices('devices_token',[
'ticker'=>'abcdef',
'title'=>'abcdef!',
'text'=>'a什么鬼'.date("h:i:s"),
]);
umengpush
MIT
extension yii2
umengpush
MIT
extension yii2