Browse Source

修复图片为空的问题

antshop
linyaostalker 5 years ago
parent
commit
367579eca6
  1. 6
      backend/modules/file/logic/file/FileManager.php

6
backend/modules/file/logic/file/FileManager.php

@ -61,15 +61,13 @@ class FileManager
foreach ($temFileIdArr as $key => $value) {
$temFile = TemFile::findOne($value);
if (!$temFile) {
throw new \Exception('存在查找不到的文件');
}
if ($temFile) {
$res = self::saveNewFile($temFile, $ownId, $ownType);
if ($key == 0) {
$firstFileId = $res['file_id'];
}
}
}
$tra->commit();
return ['status' => true, 'info' => '保存成功', 'first_file_id' => $firstFileId];

Loading…
Cancel
Save