|
|
@ -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); |
|
|
|