data = $data; } public function headings(): array { return [ ['订单ID','总金额','收益金额', '微信手续费', '平台手续费','分销时间'] ]; } public function array():array { $rows =[]; $orders = $this->data; foreach ($orders as $order) { $rows[] = ['id'=>$order["order_id"], 'total'=>$order['total'], 'amount'=>$order['amount'], 'wechat_fee'=>$order['wechat_fee'], 'ufutx_fee'=>$order['ufutx_fee'], 'time'=>$order['created_at']]; } return $rows; } }