|
@@ -5,7 +5,7 @@ use think\Db;
|
|
|
use JPush\Client;
|
|
|
require_once env('root_path').'vendor/jpush/jpush/autoload.php';
|
|
|
|
|
|
-function Jpush($user_id = 0,$alert = ''){
|
|
|
+function Jpush($user_id = 0,$alert = '',$module='',$type=''){
|
|
|
$appKey = '02a7faefd91c8a6a446a6a14';
|
|
|
$masterSecret = 'ba2e100db997024d9b6e5d35';
|
|
|
$client = new Client($appKey, $masterSecret,null);
|
|
@@ -24,7 +24,8 @@ function Jpush($user_id = 0,$alert = ''){
|
|
|
'title' => '消息通知',
|
|
|
// 'builder_id' => 2,
|
|
|
'extras' => array(
|
|
|
- 'key' => 'value',
|
|
|
+ 'module' => $module,
|
|
|
+ 'type' => $type,
|
|
|
),
|
|
|
))->options(array(
|
|
|
'apns_production' => true,// false 开发环境 ,true 生产环境
|