|
...
|
...
|
@@ -48,9 +48,9 @@ class Product extends Base |
|
|
|
|
|
|
|
public function getGalleryAttribute($value){
|
|
|
|
$value = Arr::s2a($value);
|
|
|
|
// foreach ($value as &$v){
|
|
|
|
// $v['url'] = $this->getImageUrl($v['url']);
|
|
|
|
// }
|
|
|
|
foreach ($value as &$v){
|
|
|
|
$v['url'] = $this->getImageUrl($v['url']);
|
|
|
|
}
|
|
|
|
return $value;
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -65,20 +65,20 @@ class Product extends Base |
|
|
|
$this->attributes['icon'] = Arr::a2s($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :图标获取器
|
|
|
|
* @name :getGalleryAttribute
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/7/21 11:11
|
|
|
|
*/
|
|
|
|
public function getIconAttribute($value){
|
|
|
|
$value = Arr::s2a($value);
|
|
|
|
foreach ($value as &$v){
|
|
|
|
$v = $this->getImageUrl($v);
|
|
|
|
}
|
|
|
|
return $value;
|
|
|
|
}
|
|
|
|
// /**
|
|
|
|
// * @remark :图标获取器
|
|
|
|
// * @name :getGalleryAttribute
|
|
|
|
// * @author :lyh
|
|
|
|
// * @method :post
|
|
|
|
// * @time :2023/7/21 11:11
|
|
|
|
// */
|
|
|
|
// public function getIconAttribute($value){
|
|
|
|
// $value = Arr::s2a($value);
|
|
|
|
// foreach ($value as &$v){
|
|
|
|
// $v = $this->getImageUrl($v);
|
|
|
|
// }
|
|
|
|
// return $value;
|
|
|
|
// }
|
|
|
|
|
|
|
|
public function setAttrsAttribute($value){
|
|
|
|
$this->attributes['attrs'] = Arr::a2s($value);
|
...
|
...
|
|