wesmiler 3 miesięcy temu
rodzic
commit
cf5071caf1
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      app/Services/Api/StoreService.php

+ 3 - 2
app/Services/Api/StoreService.php

@@ -113,7 +113,7 @@ class StoreService extends BaseService
             ->first();
         if(empty($storeInfo)){
             $this->error = '没有店铺信息';
-            return false;
+            return ['id'=>$storeId];
         }
 
         $list = GoodsModel::where(['store_id'=>$storeId,'status'=>1,'mark'=>1])
@@ -136,9 +136,10 @@ class StoreService extends BaseService
             ->limit($pageSize)
             ->get();
         $list = $list ? $list->toArray() : [];
-        $datas = [];
+        $datas = ['id'=>$storeId];
         if ($list) {
             $datas = [
+                'id'=>$storeId,
                 'store'=>$storeInfo,
                 'goods'=>$list
             ];