提交 eb212e26 编写于 作者: R root

添加产品默认图片

上级 92efc85e
......@@ -110,6 +110,9 @@ class Image extends Service
$imgResize = [$width , $height];
*/
$originImgPath = $this->getDir($imageVal);
if(!file_exists($originImgPath)){
$originImgPath = $this->getDir($this->defaultImg);
}
$waterImgPath = '';
if($isWatered){
$waterImgPath = $this->getDir('/'.$this->waterImg);
......@@ -119,6 +122,7 @@ class Image extends Service
\fec\helpers\CImage::saveResizeMiddleWaterImg($originImgPath,$newPath,$imgResize,$waterImgPath);
}
return $newUrl;
}
protected function getProductNewPath($imageVal,$imgResize,$waterImgPath){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册