作者 lyh

gx

@@ -66,7 +66,7 @@ class ProductController extends BaseController @@ -66,7 +66,7 @@ class ProductController extends BaseController
66 'id.required' => 'ID不能为空' 66 'id.required' => 'ID不能为空'
67 ]); 67 ]);
68 $data = $logic->getInfo($this->param['id']); 68 $data = $logic->getInfo($this->param['id']);
69 - return $this->success(Arr::twoKeepKeys($data, ['id', 'project_id', 'title', 'gallery', 'attrs', 'category_id', 'keyword_id', 'attr_id', 'describe_id', 'intro', 'content', 69 + 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',
70 'describe', 'seo_mate', 'related_product_id', 'status', 'category_id_text', 'keyword_id_text', 'status_text', 'created_uid', 'created_uid_text', 'route', 'url'])); 70 'describe', 'seo_mate', 'related_product_id', 'status', 'category_id_text', 'keyword_id_text', 'status_text', 'created_uid', 'created_uid_text', 'route', 'url']));
71 } 71 }
72 72
@@ -46,6 +46,7 @@ class ImageController extends Controller @@ -46,6 +46,7 @@ class ImageController extends Controller
46 1 => 'image_product', 46 1 => 'image_product',
47 2 => 'image_news', 47 2 => 'image_news',
48 3 => 'image_blog', 48 3 => 'image_blog',
  49 + 4 => 'image_product_icon',
49 0 => 'image_other', 50 0 => 'image_other',
50 ]; 51 ];
51 52
@@ -58,6 +58,17 @@ class Product extends Base @@ -58,6 +58,17 @@ class Product extends Base
58 return $value; 58 return $value;
59 } 59 }
60 60
  61 + /**
  62 + * @remark :图标获取器
  63 + * @name :getGalleryAttribute
  64 + * @author :lyh
  65 + * @method :post
  66 + * @time :2023/7/21 11:11
  67 + */
  68 + public function getIconAttribute($value){
  69 + $value = $this->getImageUrl($value);
  70 + return $value;
  71 + }
61 public function setAttrsAttribute($value){ 72 public function setAttrsAttribute($value){
62 $this->attributes['attrs'] = Arr::a2s($value); 73 $this->attributes['attrs'] = Arr::a2s($value);
63 } 74 }