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'] = '';