导出优化

This commit is contained in:
2025-08-05 15:37:26 +08:00
parent c92e93968e
commit 0b4e3a3f31
2 changed files with 14 additions and 13 deletions
+11 -11
View File
@@ -248,18 +248,18 @@ class CustomerService
// 创建Excel写入器
$writer = new Xlsx($spreadsheet);
// $writer->save($filepath);
$writer->save('php://output');
$excelContent = ob_get_clean();
return $excelContent;
$writer->save($filepath);
// $writer->save('php://output');
// $excelContent = ob_get_clean();
// return $excelContent;
// 返回文件信息
// return [
// 'filename' => $filename,
// 'filepath' => $filepath,
// 'size' => filesize($filepath),
// 'count' => count($customers)
// ];
// 返回文件信息
return [
'filename' => $filename,
'filepath' => $filepath,
'size' => filesize($filepath),
'count' => count($customers)
];
}
/**