orderModel = $order; } public function organizeData() { // TODO: Implement organizeData() method. $this->data = [ 'keyword1'=>['value'=> $this->member->nickname],// 客户姓名 'keyword2'=>['value'=> $this->order->order_sn],//订单号 'keyword3'=>['value'=> $this->timeData['create_time']],// 下单时间 'keyword4'=>['value'=> $this->order['price']],// 订单金额 'keyword5'=>['value'=> $this->goodsTitle],// 商品信息 ]; } public function sendMessage() { // TODO: Implement sendMessage() method. $this->processData($this->orderModel); $this->getTemplate("订单提交成功通知"); $back = []; if (empty($this->temp_open)) { $back['status'] = 0; $back['message'] = $this->temp_title."消息通知未开启"; return $back; } $this->organizeData(); $result = (new AppletMessageNotice($this->temp_id,$this->miniFans->openid,$this->data,[],2))->sendMessage(); if ($result['status'] == 0) { \Log::debug($result['message']); } } }