kphcdr 1 year ago
parent
commit
e6d51ff26b
1 changed files with 2 additions and 0 deletions
  1. 2 0
      app/Modules/Admin/Services/GoodsService.php

+ 2 - 0
app/Modules/Admin/Services/GoodsService.php

@@ -128,11 +128,13 @@ class GoodsService extends BaseService
 
 
         $return = [
         $return = [
             "id" => $model->id,
             "id" => $model->id,
+            "name" => $model->name,
             "image_list" => $model->image_list,
             "image_list" => $model->image_list,
             "category" => $model->map->map(function (GoodsCategoryMap $map) {
             "category" => $model->map->map(function (GoodsCategoryMap $map) {
                 return [
                 return [
                     "id" => $map->category->id,
                     "id" => $map->category->id,
                     "is_public" => $map->is_public,
                     "is_public" => $map->is_public,
+                    "name" => $map->category->name,
                 ];
                 ];
             }),
             }),
             "spec" => $model->spec,
             "spec" => $model->spec,