From 53d652bc8526930d5baf0a06cac6912b12e29963 Mon Sep 17 00:00:00 2001 From: zengyyh Date: Sun, 23 Jun 2024 23:01:27 +0800 Subject: [PATCH] a --- app/api/controller/Merchant.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/api/controller/Merchant.php b/app/api/controller/Merchant.php index 9e05eb1d..190deea7 100644 --- a/app/api/controller/Merchant.php +++ b/app/api/controller/Merchant.php @@ -180,11 +180,15 @@ class Merchant extends Controller } public function getShopCategory(): Json{ + $list = []; $merchantId = $this->request->param('merchantId'); $merchant = new MerchantGoodsCate; $merchant = $merchant->where('merchant_id', $merchantId) ->field('goods_cate') ->find(); + if(empty($merchant)){ + return $this->renderSuccess(compact('list')); + } // $merchant = MerchantGoodsCate::detail($merchantId); $merchant = $merchant['goods_cate']; $goods_cate = explode(",", $merchant);