lqmac 6 months ago
parent 507448c958
commit d0f4feff3f
  1. 2
      app/admin/controller/Channel.php
  2. 2
      app/common/model/Channel.php

@ -36,7 +36,7 @@ class Channel extends Controller
$list = $model->getList()->toArray();
foreach ($list['data'] as $kr => &$r) {
$r['licenseImg'] = [];
if ($r['license_img_id']) {
if (isset($r['license_img_id']) && $r['license_img_id']) {
$img_ids = explode(",", $r['license_img_id']);
$files = UploadFile::getFileList($img_ids, 0);
$r['licenseImg'] = $files ?: null;

@ -77,7 +77,7 @@ class Channel extends BaseModel
{
return $this->with(['logoImage'])
->where('status', '=', 1)
->order(['weigh' => 'asc', 'create_time' => 'desc'])
->order(['weigh' => 'asc', 'id' => 'desc'])
->paginate($pageSize);
}
}

Loading…
Cancel
Save