From d0f4feff3f865ac362338b58705430c933e836bf Mon Sep 17 00:00:00 2001 From: lqmac Date: Tue, 4 Jun 2024 23:40:23 +0800 Subject: [PATCH] 1 --- app/admin/controller/Channel.php | 2 +- app/common/model/Channel.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); } }