|
...
|
...
|
@@ -290,9 +290,13 @@ class ImageController extends Controller |
|
|
|
'name'=>$name,
|
|
|
|
'en_name'=>$fileName
|
|
|
|
];
|
|
|
|
$rs = $imageModel->add($data);
|
|
|
|
if ($rs === false) {
|
|
|
|
return $this->response('添加失败', Code::USER_ERROR);
|
|
|
|
$imageModel = new ImageModel();
|
|
|
|
$info = $imageModel->read(['hash'=>$hash,'project_id'=>$this->cache['project_id'] ?? 0]);
|
|
|
|
if($info === false){
|
|
|
|
$rs = $imageModel->add($data);
|
|
|
|
if ($rs === false) {
|
|
|
|
return $this->response('添加失败', Code::USER_ERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
...
|
...
|
|