修复导出报错

This commit is contained in:
evoxwht 2021-07-12 12:04:58 +08:00
parent 63dba0026e
commit 976310e23f

View File

@ -37,7 +37,7 @@ class ExportServices extends BaseServices
->setExcelTile($title, $name, $info)
->setExcelContent($export)
->excelSave($filename, $suffix, $is_save);
$path = $this->siteUrl() . $path;
$path = $this->siteUrl() . '/' . $path;
return [$path];
}
@ -572,8 +572,8 @@ HTML;
$export = [];
foreach ($data['series'] as $index => $item) {
foreach ($data['x'] as $k => $v) {
$export[$v]['time'] = $v;
$export[$v][] = $item['value'][$k];
$export[$v]['time'] = $v;
$export[$v][] = $item['value'][$k];
}
}
}