data = $data; } /** * Execute the job. * * @return void */ public function handle() { // $this->data['receive_time'] = date("Y-m-d H:i:s"); echo json_encode($this->data); $openid = isset($this->data['data']['openid'])?$this->data['data']['openid']:''; v('sendSmartNewsStart:'.$openid); try{ $TemplateWork = new NewsWorksController($this->data['data']); $TemplateWork->do_work(); } // 加上\ 全局抓取 catch(\Exception $e){ v('handle_ept: info:'.$e->getMessage()); } } /** * The job failed to process. * * @param Exception $exception * @return void */ public function failed(Exception $exception) { // Send user notification of failure, etc... v('sendSmartNews_ept:'.$exception->getMessage().' data:'.json_encode($this->data)); } }