refactor: 修改各模块导出

This commit is contained in:
2025-04-02 16:23:29 +08:00
parent be737b3946
commit e750c8bbc7
11 changed files with 14 additions and 13 deletions

View File

@@ -40,19 +40,19 @@ class LeaveMessage
public function export()
{
$schema = [
'created_at' => '提交时间',
'id' => 'ID',
'name' => '姓名',
'email' => '邮箱',
'ip' => 'IP',
'content' => '留言内容',
'created_at' => '提交时间'
'content' => '留言内容'
];
// 获取留言导出数据
$msgs = $this->getLeaveMessageExportData();
// 导出
return xlsx_writer($msgs, $schema);
return xlsx_writer($msgs, $schema, '联系我们列表' . date('YmdHis'));
}
// 获取留言导出数据
private function getLeaveMessageExportData()