|
...
|
...
|
@@ -32,10 +32,9 @@ class Product extends Base |
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
// public function setThumbAttribute($value){
|
|
|
|
// $value['url'] = Upload::url2path($value['url']);
|
|
|
|
// $this->attributes['thumb'] = Arr::a2s($value);
|
|
|
|
// }
|
|
|
|
public function setThumbAttribute($value){
|
|
|
|
$this->attributes['thumb'] = Arr::a2s($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getThumbAttribute($value){
|
|
|
|
$value = Arr::s2a($value);
|
|
...
|
...
|
@@ -43,12 +42,9 @@ class Product extends Base |
|
|
|
return $value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// public function setGalleryAttribute($value){
|
|
|
|
// foreach ($value as &$v){
|
|
|
|
// $v['url'] = Upload::url2path($v['url']);
|
|
|
|
// }
|
|
|
|
// $this->attributes['gallery'] = Arr::a2s($value);
|
|
|
|
// }
|
|
|
|
public function setGalleryAttribute($value){
|
|
|
|
$this->attributes['gallery'] = Arr::a2s($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getGalleryAttribute($value){
|
|
|
|
$value = Arr::s2a($value);
|
|
...
|
...
|
@@ -65,10 +61,22 @@ class Product extends Base |
|
|
|
* @method :post
|
|
|
|
* @time :2023/7/21 11:11
|
|
|
|
*/
|
|
|
|
public function setIconAttribute($value){
|
|
|
|
$this->attributes['gallery'] = Arr::a2s($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :图标获取器
|
|
|
|
* @name :getGalleryAttribute
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/7/21 11:11
|
|
|
|
*/
|
|
|
|
public function getIconAttribute($value){
|
|
|
|
$value = $this->getImageUrl($value);
|
|
|
|
return $value;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setAttrsAttribute($value){
|
|
|
|
$this->attributes['attrs'] = Arr::a2s($value);
|
|
|
|
}
|
...
|
...
|
|