作者 lyh

gx

... ... @@ -66,7 +66,7 @@ class ProductController extends BaseController
'id.required' => 'ID不能为空'
]);
$data = $logic->getInfo($this->param['id']);
return $this->success(Arr::twoKeepKeys($data, ['id', 'project_id', 'title', 'gallery', 'attrs', 'category_id', 'keyword_id', 'attr_id', 'describe_id', 'intro', 'content',
return $this->success(Arr::twoKeepKeys($data, ['id', 'project_id', 'product_type', 'icon' , 'title', 'gallery', 'attrs', 'category_id', 'keyword_id', 'attr_id', 'describe_id', 'intro', 'content',
'describe', 'seo_mate', 'related_product_id', 'status', 'category_id_text', 'keyword_id_text', 'status_text', 'created_uid', 'created_uid_text', 'route', 'url']));
}
... ...
... ... @@ -46,6 +46,7 @@ class ImageController extends Controller
1 => 'image_product',
2 => 'image_news',
3 => 'image_blog',
4 => 'image_product_icon',
0 => 'image_other',
];
... ...
... ... @@ -58,6 +58,17 @@ class Product extends Base
return $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);
}
... ...