diff --git a/app/admin/controller/Channel.php b/app/admin/controller/Channel.php index ebbc9cdd..65fe4eb2 100644 --- a/app/admin/controller/Channel.php +++ b/app/admin/controller/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; diff --git a/app/common/model/Channel.php b/app/common/model/Channel.php index a35174ee..02aa059c 100644 --- a/app/common/model/Channel.php +++ b/app/common/model/Channel.php @@ -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); } }