Browse Source

处理图片主图为空

master
Lemon 5 years ago
parent
commit
d318fd4e4f
  1. 6
      app/Model/v3/Goods.php

6
app/Model/v3/Goods.php

@ -109,7 +109,11 @@ class Goods extends Model
public function getCoverImgAttribute($value)
{
return $this->attachmentService->switchImgToAliOss($value, OssThumbnail::THUMBNAIL_600_Q90);
if(!empty($value)) {
return $this->attachmentService->switchImgToAliOss($value, OssThumbnail::THUMBNAIL_600_Q90);
}else{
return '';
}
}
public function getMonthSalesAttribute()

Loading…
Cancel
Save