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