Browse Source

添加goods coverimg处理

master
Mike 6 years ago
parent
commit
e7275ea765
  1. 9
      app/Model/v3/Goods.php

9
app/Model/v3/Goods.php

@ -78,6 +78,15 @@ class Goods extends Model
return $query->orderBy('price', $sort);
}
public function getCoverImgAttribute($value)
{
if(strripos($value,"http") === false){
return config('alioss.img_host').'/'.$value;
}else{
return $value;
}
}
public function getMonthSalesAttribute()
{
$ssdb = ApplicationContext::getContainer()->get(SSDBTask::class);

Loading…
Cancel
Save