Browse Source

获取规格

afa 5 months ago
parent
commit
673b56498d
1 changed files with 3 additions and 2 deletions
  1. 3 2
      app/api/controller/Shops.php

+ 3 - 2
app/api/controller/Shops.php

@@ -42,8 +42,9 @@ class Shops extends Base
         if( empty($shop_id)){
             $this->error('参数有误');
         }
-     
-        return $this->success('ok',  json_decode($shopList->where('id', $shop_id)->value('type_spec'), true));  
+        $spec = $shopList->where('id', $shop_id)->value('type_spec');
+        $shopList = $spec?json_decode($spec, true): [];
+        return $this->success('ok', $shopList);  
     }