zengyyh 5 months ago
parent 58c6f7b4c9
commit 53d652bc85
  1. 4
      app/api/controller/Merchant.php

@ -180,11 +180,15 @@ class Merchant extends Controller
} }
public function getShopCategory(): Json{ public function getShopCategory(): Json{
$list = [];
$merchantId = $this->request->param('merchantId'); $merchantId = $this->request->param('merchantId');
$merchant = new MerchantGoodsCate; $merchant = new MerchantGoodsCate;
$merchant = $merchant->where('merchant_id', $merchantId) $merchant = $merchant->where('merchant_id', $merchantId)
->field('goods_cate') ->field('goods_cate')
->find(); ->find();
if(empty($merchant)){
return $this->renderSuccess(compact('list'));
}
// $merchant = MerchantGoodsCate::detail($merchantId); // $merchant = MerchantGoodsCate::detail($merchantId);
$merchant = $merchant['goods_cate']; $merchant = $merchant['goods_cate'];
$goods_cate = explode(",", $merchant); $goods_cate = explode(",", $merchant);

Loading…
Cancel
Save