Commit bbbb27ae authored by hujun's avatar hujun

image

parent 6ffa00d3
......@@ -118,8 +118,11 @@ class JobTask
$image_data = $depot->getImageDepotList('img_name', [], 1, 500);
$path = './static/shop_image_depot/';
foreach ($image_data as $k=>$v) {
$image = \think\Image::open($path.$v['img_name']);
$image->thumb(960, 960)->save($path.$v['img_name']);
$file_path = $path.$v['img_name'];
if (file_exists($file_path)) {
$image = \think\Image::open($file_path);
$image->thumb(900, 900)->save($file_path);
}
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment