shish hace 2 años
padre
commit
d9b720bbf8
Se han modificado 1 ficheros con 12 adiciones y 0 borrados
  1. 12 0
      app-hd/controllers/ProductController.php

+ 12 - 0
app-hd/controllers/ProductController.php

@@ -457,6 +457,18 @@ class ProductController extends BaseController
                 }
                 }
             }
             }
             $respond = ProductService::assembleData($classIds, $itemInfoData, true);
             $respond = ProductService::assembleData($classIds, $itemInfoData, true);
+
+            if (isset($respond['classItem']) && !empty($respond['classItem'])) {
+                foreach ($respond['classItem'] as $bigKey => $bigVal) {
+                    if (isset($bigVal['child']) && !empty($bigVal['child'])) {
+                        foreach ($bigVal['child'] as $key => $val) {
+                            unset($bigVal['child'][$key]['cover']);
+                        }
+                        $respond['classItem'][$bigKey]['child'] = $bigVal['child'];
+                    }
+                }
+            }
+
             util::success($respond);
             util::success($respond);
         } catch (\Exception $e) {
         } catch (\Exception $e) {
             $transaction->rollBack();
             $transaction->rollBack();