Quellcode durchsuchen

feat: EK-856: 管理员增加“Country”属性.

kevinElken vor 1 Jahr
Ursprung
Commit
a6467a7d71
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      backendApi/modules/v1/controllers/ShopController.php

+ 1 - 1
backendApi/modules/v1/controllers/ShopController.php

@@ -197,7 +197,7 @@ class ShopController extends BaseController {
             $countries[$key]['SHOP_GOODS_NATURE'] = ShopGoodsNature::findAllAsArray('GOODS_ID=:GOODS_ID AND COUNTRY_ID=:COUNTRY_ID', [':GOODS_ID' => $id, ':COUNTRY_ID' => $country['ID']]);
             $countries[$key]['SHOP_GOODS_NATURE'] = ShopGoodsNature::findAllAsArray('GOODS_ID=:GOODS_ID AND COUNTRY_ID=:COUNTRY_ID', [':GOODS_ID' => $id, ':COUNTRY_ID' => $country['ID']]);
         }
         }
 
 
-        $data['SHOP_GOODS_NATURE'] = $countries;
+        $data['SHOP_GOODS_NATURE'] = array_values($countries);
 
 
         return static::notice(
         return static::notice(
             [
             [