Mike 7 роки тому
батько
коміт
bfa3a065d7

+ 5 - 5
server/app/Helper/JpushHelper.php

xqd xqd
@@ -23,7 +23,7 @@ trait JpushHelper
         if($user&&$user->jpush){
             $regId = array($user->jpush);
             $options = array(
-                'apns_production' => true,
+                'apns_production' => false,
             );
             try {
                 $pusher = $client->push();
@@ -35,16 +35,16 @@ trait JpushHelper
                         'title' => $content,
                         'content_type' => 'text',
                         'extras' => [
-                            'type' => 1,
-                            'id' => 2,
+                            'type' => $type,
+                            'id' => $id,
                         ]
                     ]);
                     $pusher->iosNotification($title, [
                         'sound' => 'sound',
                         'badge' => '+1',
                         'extras' => [
-                            'type' => 1,
-                            'id' => 2,
+                            'type' => $type,
+                            'id' => $id,
                         ]
                     ]);
                 }

+ 1 - 1
server/app/Http/Controllers/Api/V1/AuthController.php

xqd
@@ -23,7 +23,7 @@ class AuthController extends Controller
 
     public function test(){
         //test
-        $this->jPush("title",'content',77,2,452);
+//        $this->jPush("title",'141fe1da9e8a58e72fe',77,2,452);
         if(env("APP_DEBUG")){
             return $this->error(0);
         }else{