作者 lyh

gx

@@ -31,7 +31,7 @@ class ProductLogic extends BaseLogic @@ -31,7 +31,7 @@ class ProductLogic extends BaseLogic
31 { 31 {
32 $data = parent::getList($map, $sort, $columns, $row); 32 $data = parent::getList($map, $sort, $columns, $row);
33 foreach ($data['list'] as &$v){ 33 foreach ($data['list'] as &$v){
34 -// $v = $this->formatData($v); 34 + $v = $this->formatData($v);
35 $v['thumb']['image_link'] = getImageUrl($v['thumb']['url']);//图片统一 35 $v['thumb']['image_link'] = getImageUrl($v['thumb']['url']);//图片统一
36 } 36 }
37 return $this->success($data); 37 return $this->success($data);
@@ -53,14 +53,14 @@ class ProductLogic extends BaseLogic @@ -53,14 +53,14 @@ class ProductLogic extends BaseLogic
53 } 53 }
54 54
55 public function formatData($info){ 55 public function formatData($info){
56 - foreach ($info['category_id'] as $category_id) {  
57 - $info['category_id_text'][] = (new CategoryLogic())->getCacheInfo($category_id)['title'] ?? '';  
58 - }  
59 - foreach ($info['keyword_id'] as $keyword_id){  
60 - $info['keyword_id_text'][] =(new KeywordLogic())->getCacheInfo($keyword_id)['title']??'';  
61 - }  
62 - $info['category_id_text'] = Arr::arrToSet($info['category_id_text'], 'trim');  
63 - $info['keyword_id_text'] = Arr::arrToSet($info['keyword_id_text'], 'trim'); 56 +// foreach ($info['category_id'] as $category_id) {
  57 +// $info['category_id_text'][] = (new CategoryLogic())->getCacheInfo($category_id)['title'] ?? '';
  58 +// }
  59 +// foreach ($info['keyword_id'] as $keyword_id){
  60 +// $info['keyword_id_text'][] =(new KeywordLogic())->getCacheInfo($keyword_id)['title']??'';
  61 +// }
  62 +// $info['category_id_text'] = Arr::arrToSet($info['category_id_text'], 'trim');
  63 +// $info['keyword_id_text'] = Arr::arrToSet($info['keyword_id_text'], 'trim');
64 $info['status_text'] = Product::statusMap()[$info['status']] ?? ''; 64 $info['status_text'] = Product::statusMap()[$info['status']] ?? '';
65 $info['created_uid_text'] = (new UserLogic())->getCacheInfo($info['created_uid'])['name'] ?? ''; 65 $info['created_uid_text'] = (new UserLogic())->getCacheInfo($info['created_uid'])['name'] ?? '';
66 $info['url'] = $this->getProjectDomain() . $info['route'] ; 66 $info['url'] = $this->getProjectDomain() . $info['route'] ;