withdraw = $withdraw; $this->getWithdrawModel($withdraw); } public function organizeData() { // TODO: Implement organizeData() method. $this->data = [ 'time1'=>['value'=> $this->withdraw->created_at->toDateTimeString()],// 提现时间 'amount3'=>['value'=> $this->withdraw->amounts],//提现金额 'thing2'=>['value'=> $this->checkDataLength($this->payWayName(),20)],// 提现方式 'phrase4'=>['value'=> $this->checkDataLength($this->getStatusComment($this->withdraw->status),5)],// 提现状态 ]; } public function sendMessage() { // TODO: Implement sendMessage() method. $this->getTemplate("提现状态通知"); $back = []; if (empty($this->temp_open)) { $back['message'] = $this->temp_title."消息通知未开启"; \Log::debug($back['message']); return ; } $this->organizeData(); $this->getMember(); \Log::debug("新版小程序消息-提现状态1",$this->temp_id); \Log::debug("新版小程序消息-提现状态2",$this->openid); \Log::debug("新版小程序消息-提现状态3",$this->data); $result = (new AppletMessageNotice($this->temp_id,$this->openid,$this->data,[],2))->sendMessage(); if ($result['status'] == 0) { \Log::debug($result['message']); } } }