templateId='T7v9IU5OahMKrnQ7Wq9UxEKffnir96oE4UMbasO6bbo'; // $this->url='http://weidian.jiuweiyun.cn/web/user'; $this->url='https://weidian.cliu.cc/web/user'; } public function handle(WithdrawalEvent $event) { try{ $data=$event->data; $openid=$data['openid']; $config=config('wechat.official_account.daweiboshi'); $app = Factory::officialAccount($config); $app->template_message->send([ 'touser' => $openid, 'template_id' => $this->templateId, 'url' => $this->url, 'data' => $data['data'] ]); }catch (\Exception $exception){ Log::error('发送模板消息出错,出错内容为'.$exception); } } }