作者 lyh

gx

@@ -54,31 +54,31 @@ class Product extends Base @@ -54,31 +54,31 @@ class Product extends Base
54 return $value; 54 return $value;
55 } 55 }
56 56
57 -// /**  
58 -// * @remark :图标获取器  
59 -// * @name :getGalleryAttribute  
60 -// * @author :lyh  
61 -// * @method :post  
62 -// * @time :2023/7/21 11:11  
63 -// */  
64 -// public function setIconAttribute($value){  
65 -// $this->attributes['icon'] = Arr::a2s($value);  
66 -// }  
67 -//  
68 -// /**  
69 -// * @remark :图标获取器  
70 -// * @name :getGalleryAttribute  
71 -// * @author :lyh  
72 -// * @method :post  
73 -// * @time :2023/7/21 11:11  
74 -// */  
75 -// public function getIconAttribute($value){  
76 -// $value = Arr::s2a($value);  
77 -// foreach ($value as &$v){  
78 -// $v = $this->getImageUrl($v);  
79 -// }  
80 -// return $value;  
81 -// } 57 + /**
  58 + * @remark :图标获取器
  59 + * @name :getGalleryAttribute
  60 + * @author :lyh
  61 + * @method :post
  62 + * @time :2023/7/21 11:11
  63 + */
  64 + public function setIconAttribute($value){
  65 + $this->attributes['icon'] = Arr::a2s($value);
  66 + }
  67 +
  68 + /**
  69 + * @remark :图标获取器
  70 + * @name :getGalleryAttribute
  71 + * @author :lyh
  72 + * @method :post
  73 + * @time :2023/7/21 11:11
  74 + */
  75 + public function getIconAttribute($value){
  76 + $value = Arr::s2a($value);
  77 + foreach ($value as &$v){
  78 + $v = $this->getImageUrl($v);
  79 + }
  80 + return $value;
  81 + }
82 82
83 public function setAttrsAttribute($value){ 83 public function setAttrsAttribute($value){
84 $this->attributes['attrs'] = Arr::a2s($value); 84 $this->attributes['attrs'] = Arr::a2s($value);