作者 张关杰

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into develop

... ... @@ -58,10 +58,11 @@ class ProductLogic extends BaseLogic
//统一图片链接
if(!empty($info['gallery'])){
foreach ($info['gallery'] as $k => $v){
$v['image_link'] = $v['url'];
$v['image_link'] = $this->getImageUrl($v['url']);
$info['gallery'][$k] = $v;
}
}
$info['icon_link'] = $this->getImageUrl($info['icon']);
return $info;
}
... ...
... ... @@ -36,12 +36,12 @@ class Category extends Base
public function getImageAttribute($value)
{
return Upload::path2url($value);
return $this->getImageUrl($value);
}
public function setImageAttribute($value)
{
$this->attributes['image'] = Upload::url2path($value);
$this->attributes['image'] = $value;
}
... ...
... ... @@ -48,9 +48,6 @@ class Product extends Base
public function getGalleryAttribute($value){
$value = Arr::s2a($value);
foreach ($value as &$v){
$v['url'] = $this->getImageUrl($v['url']);
}
return $value;
}
... ... @@ -74,9 +71,6 @@ class Product extends Base
*/
public function getIconAttribute($value){
$value = Arr::s2a($value);
foreach ($value as &$v){
$v = $this->getImageUrl($v);
}
return $value;
}
... ...