|
|
|
@ -15,7 +15,7 @@ namespace app\admin\controller; |
|
|
|
|
use think\response\Json; |
|
|
|
|
use app\admin\controller\Controller; |
|
|
|
|
use app\admin\model\Channel as ChannelModel; |
|
|
|
|
|
|
|
|
|
use app\common\model\UploadFile; |
|
|
|
|
/** |
|
|
|
|
* 商家后台菜单控制器 |
|
|
|
|
* Class Menu |
|
|
|
@ -34,12 +34,12 @@ class Channel extends Controller |
|
|
|
|
{ |
|
|
|
|
$model = new ChannelModel; |
|
|
|
|
$list = $model->getList()->toArray(); |
|
|
|
|
foreach ($list['data'] as $kr => $r) { |
|
|
|
|
$res[$kr]['licenseImg'] = []; |
|
|
|
|
foreach ($list['data'] as $kr => &$r) { |
|
|
|
|
$r['licenseImg'] = []; |
|
|
|
|
if ($r['license_img_id']) { |
|
|
|
|
$img_ids = explode(",", $r['license_img_id']); |
|
|
|
|
$files = UploadFile::getFileList($img_ids); |
|
|
|
|
$list['data'][$kr]['licenseImg'] = $files ?: null; |
|
|
|
|
$files = UploadFile::getFileList($img_ids, 0); |
|
|
|
|
$r['licenseImg'] = $files ?: null; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return $this->renderSuccess(compact('list')); |
|
|
|
|