From 56f27172a423c57bfe26d0e06ee1569e62a1235c Mon Sep 17 00:00:00 2001 From: zwesy Date: Thu, 10 Dec 2020 12:17:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=EF=BC=9A=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E5=8D=95=E9=A1=B5=E7=BB=84=E5=9B=BE=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E6=97=B6=E7=BB=84=E5=9B=BE=E6=95=B0=E7=BB=84=E9=94=AE?= =?UTF-8?q?=E5=90=8D=E6=9C=AA=E9=87=8D=E7=BD=AE=E8=80=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/manager/Content.php | 1 + app/controller/manager/Page.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/controller/manager/Content.php b/app/controller/manager/Content.php index 20bdbe5..5f6ef0c 100644 --- a/app/controller/manager/Content.php +++ b/app/controller/manager/Content.php @@ -120,6 +120,7 @@ class Content extends Base if(!empty($groupIds)){ foreach($groupIds as $key => $groupId){ $group = $groups[$groupId] ?? []; + $group = array_values($group); $data[] = [ 'id' => $groupId, 'value' => json_encode($group) diff --git a/app/controller/manager/Page.php b/app/controller/manager/Page.php index 3816ec8..649c086 100644 --- a/app/controller/manager/Page.php +++ b/app/controller/manager/Page.php @@ -326,6 +326,7 @@ class Page extends Base $imgs = input('post.img/a'); $categoryId = input('post.category_id/d'); if (!empty($imgs) && is_array($imgs)) { + $imgs = array_values($imgs); $item['value'] = json_encode($imgs); } else { $item['value'] = '';