Skip to content

Commit

Permalink
添加产品默认图片
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Mar 6, 2017
1 parent 92efc85 commit eb212e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions services/product/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ protected function actionGetResize($imageVal,$imgResize,$isWatered=false){
$imgResize = [$width , $height];
*/
$originImgPath = $this->getDir($imageVal);
if(!file_exists($originImgPath)){
$originImgPath = $this->getDir($this->defaultImg);
}
$waterImgPath = '';
if($isWatered){
$waterImgPath = $this->getDir('/'.$this->waterImg);
Expand All @@ -119,6 +122,7 @@ protected function actionGetResize($imageVal,$imgResize,$isWatered=false){
\fec\helpers\CImage::saveResizeMiddleWaterImg($originImgPath,$newPath,$imgResize,$waterImgPath);
}
return $newUrl;

}

protected function getProductNewPath($imageVal,$imgResize,$waterImgPath){
Expand Down

0 comments on commit eb212e2

Please sign in to comment.