|
|
|
@ -13,6 +13,7 @@ declare (strict_types=1); |
|
|
|
|
namespace app\store\controller; |
|
|
|
|
|
|
|
|
|
use app\common\model\store\StoreSettle; |
|
|
|
|
use app\common\model\UploadFile; |
|
|
|
|
use think\response\Json; |
|
|
|
|
use app\store\model\Merchant as MerchantModel; |
|
|
|
|
use app\store\model\Style as StyleModel; |
|
|
|
@ -111,8 +112,16 @@ class Merchant extends Controller |
|
|
|
|
*/ |
|
|
|
|
public function list(): Json { |
|
|
|
|
$model = new MerchantModel; |
|
|
|
|
$list = $model->getList($this->request->param()); |
|
|
|
|
return $this->renderSuccess(compact('list')); |
|
|
|
|
$list = $model->getList($this->request->param())->toArray(); |
|
|
|
|
foreach ($list['data'] as $kr => $r) { |
|
|
|
|
$res[$kr]['licenseImg'] = []; |
|
|
|
|
if ($r['license_img_id']) { |
|
|
|
|
$img_ids = explode(",", $r['license_img_id']); |
|
|
|
|
$files = UploadFile::getFileList($img_ids); |
|
|
|
|
$list['data'][$kr]['licenseImg'] = $files ?: null; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return $this->renderSuccess($list); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|