修复错误

This commit is contained in:
mkm 2023-05-11 10:14:18 +08:00
parent cc57379223
commit a377c02a43

View File

@ -57,7 +57,13 @@ class StoreProduct extends BaseController
{
[$page, $limit] = $this->getPage();
$where = $this->request->params(['cate_id', 'keyword', ['type',20], 'mer_cate_id', 'is_gift_bag', 'status', 'us_status', 'product_id', 'mer_labels',['order','sort']]);
$where = array_merge($where, $this->repository->switchType($where['type'], $merId, 0));
$merchant = app()->make(MerchantRepository::class)->get($merId);
if ($merchant['type_id']==12){
$product_type=98;//供应链
}else{
$product_type=0;//普通商品
}
$where = array_merge($where, $this->repository->switchType($where['type'], $merId, $product_type));
return app('json')->success($this->repository->getList($merId, $where, $page, $limit));
}