|
...
|
...
|
@@ -175,7 +175,7 @@ class ImageController |
|
|
|
$hash = hash_file('md5', $file->getPathname());
|
|
|
|
$image_hash = $imageModel->read(['hash'=>$hash]);
|
|
|
|
if($image_hash !== false){
|
|
|
|
$data[] = $hash;
|
|
|
|
$data['images'][] = $hash;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
$url = $this->path;
|
|
...
|
...
|
@@ -192,7 +192,7 @@ class ImageController |
|
|
|
'hash' => $hash,
|
|
|
|
'type'=>$file->getClientOriginalExtension(),
|
|
|
|
];
|
|
|
|
$data[] = $hash;
|
|
|
|
$data['images'][] = $hash;
|
|
|
|
}
|
|
|
|
$imageModel->insert($save_data);
|
|
|
|
return $this->response('图片资源',Code::SUCCESS,['images'=>$data]);
|
|
...
|
...
|
@@ -242,8 +242,6 @@ class ImageController |
|
|
|
$data[$k] = '';
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
var_dump($data);
|
|
|
|
die();
|
|
|
|
//获取操作人
|
|
|
|
switch ((string) $k) {
|
|
|
|
case 'image':
|
|
...
|
...
|
@@ -251,7 +249,6 @@ class ImageController |
|
|
|
break;
|
|
|
|
case 'images':
|
|
|
|
$v = explode(',',$v);
|
|
|
|
|
|
|
|
foreach ($v as $k1=>$v1){
|
|
|
|
$data['images_link'][$k1] = url('/b/image/' . $v1);
|
|
|
|
}
|
...
|
...
|
|