From 002b2369fecefa383a2d9ff8e172a8db6a251a16 Mon Sep 17 00:00:00 2001 From: Lemon <15040771@qq.com> Date: Thu, 5 Nov 2020 16:48:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=97=E9=93=BA=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/v3/Implementations/StoreService.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Service/v3/Implementations/StoreService.php b/app/Service/v3/Implementations/StoreService.php index 619582f..f871056 100644 --- a/app/Service/v3/Implementations/StoreService.php +++ b/app/Service/v3/Implementations/StoreService.php @@ -69,8 +69,10 @@ class StoreService implements StoreServiceInterface $stores = $paginate->toArray(); $market->stores = $stores['data']; $newIds = array_values(array_column($stores['data'], 'id')); - $ids = array_merge($newIds,$ids); - return ['has_more_pages' => $paginate->hasMorePages(), 'market' => $market,'ids' => $ids]; + if(!is_null($ids)){ + $newIds = array_merge($newIds,$ids); + } + return ['has_more_pages' => $paginate->hasMorePages(), 'market' => $market,'ids' => $newIds]; } public function getListByMarketId($marketId, $page=1, $pagesize=10)