Wang Chen пре 4 година
родитељ
комит
5adba886cc
1 измењених фајлова са 6 додато и 2 уклоњено
  1. 6 2
      app/Console/Commands/Push/PushTest.php

+ 6 - 2
app/Console/Commands/Push/PushTest.php

@@ -20,7 +20,7 @@ class PushTest extends Command
      *
      *
      * @var string
      * @var string
      */
      */
-    protected $signature = 'push:test {uid}';
+    protected $signature = 'push:test {uid} {url}';
 
 
     /**
     /**
      * The console command description.
      * The console command description.
@@ -35,7 +35,8 @@ class PushTest extends Command
     public function handle()
     public function handle()
     {
     {
         // 用户Uid
         // 用户Uid
-        $uid = $this->argument('uid');
+        $uid    = $this->argument('uid');
+        $newUrl = $this->argument('url');
 
 
         // 获取用户push信息
         // 获取用户push信息
         $pushUser  = QappPushUser::getPushUserByUid($uid);
         $pushUser  = QappPushUser::getPushUserByUid($uid);
@@ -65,6 +66,9 @@ class PushTest extends Command
         $title   = 'this title';
         $title   = 'this title';
         $content = 'this content ' . date('Y-m-d H:i:s');
         $content = 'this content ' . date('Y-m-d H:i:s');
         $url     = '/views/Reader?send_order_id=1643289&bid=vdqY7p15xnZQzK4VzzgmMD6wG2yr8BNX&chapter_id=4774851';
         $url     = '/views/Reader?send_order_id=1643289&bid=vdqY7p15xnZQzK4VzzgmMD6wG2yr8BNX&chapter_id=4774851';
+        if (strlen($newUrl) > 5) {
+            $url = $newUrl;
+        }
         var_dump('uid:' . $uid);
         var_dump('uid:' . $uid);
         var_dump('title:' . $title);
         var_dump('title:' . $title);
         var_dump('content:' . $content);
         var_dump('content:' . $content);