user = $user; } /** * Execute the job. * * @return void */ public function handle() { $user = $this->user; $method = "GET"; $url1 = "http://192.168.1.201:8585/dma/nutrient/".$user->id; CommonService::http($method, $url1); $param = [ 'touser'=>$user->officialWechat->openid, 'template_id'=>config('wechat.tpls.make_nutrient_notice'), 'url'=>'', 'miniprogram'=>[ 'appid'=>config('wechat.mini_program.app_id'), 'pagepath'=>'pages/tabBar/serve', ], 'data'=>[ 'first'=>['value'=>'您的营养素生成成功!'], 'keyword1'=>['value'=>$user->name], "keyword2"=>['value'=>date('Y-m-d H:i:s')], 'remark'=>['value'=>"点击进入查看详情"] ] ]; SendTemplateNotice::dispatch($param)->onQueue('health')->delay(now()->addSeconds(5)); // $url2 = "http://192.168.1.201:8585/dma/guide/".$user->id; // CommonService::http($method, $url2); } }