order = $order; } public function toWechat($notifiable) { // $det = ''; // foreach ($this->order->details as $detail) { // $det .= $detail->item->getTitle() . '*' . $detail->number . '/'; // } // $det = rtrim($det, '/'); // $app = app('wechat.official_account'); // if($notifiable->openid){ // $app->template_message->send([ // 'touser' => $notifiable->openid, // 'template_id' => $this->TPL, // 'url' => route('orders.show',$this->order->orderid), // 'data' => [ // 'first' => [ // 'value' => '恭喜您达到满仓资格,获得满仓奖励一份,您在“待付款”订单中支付满仓赠品的运费后,即可成功领取满仓奖励', // 'color' => '#FF0000', // ], // 'keyword1' =>$this->order->created_at, // 'keyword2' => $this->order->orderid,//订单编号 // 'keyword3' => $det,//商品名称 // 'keyword4' => number_format($this->order->total - $this->order->score,2), // ], // ]); // } } public function toArray($notifiable) { return [ // ]; } }