lqmac 7 months ago
parent 699f0298de
commit 7a3f406cea
  1. 1
      app/common/model/Merchant.php
  2. 3
      app/store/controller/Goods.php
  3. 4
      app/store/controller/Merchant.php

@ -134,6 +134,7 @@ class Merchant extends BaseModel
isset($params['shop_label']) && $filter[] = ['shop_label', '=', $params['shop_label']];
isset($params['score']) && $filter[] = ['score', '=', (int)$params['score']];
isset($params['merchant_id']) && $filter[] = ['merchant_id', '=', (int)$params['merchant_id']];
return $filter;
}

@ -37,10 +37,9 @@ class Goods extends Controller
$model = new GoodsModel;
$params = $this->request->param();
//$params['channel'] = 'zy';
if (!isset($params['merchant_id'])) {
if (!isset($params['merchant_id']) || !$params['merchant_id']) {
$params['merchant_id'] = $this->merchantId;
}
$list = $model->getList($params, (int)$this->request->param('pageSize', 15));
if ($list->isEmpty()) {
return $this->renderSuccess(compact('list'));

@ -131,6 +131,10 @@ class Merchant extends Controller
public function list(): Json {
$model = new MerchantModel;
$param = $this->request->param();
if ($this->merchantId) {
$param['merchant_id'] = $this->merchantId;
}
$list = $model->getList($param, (int)$param['pageSize'] ?? 15)->toArray();
foreach ($list['data'] as $kr => $r) {
$res[$kr]['licenseImg'] = [];

Loading…
Cancel
Save