更新:后台组图提交时重置数组顺序
parent
76c08939a0
commit
66047618a4
|
@ -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)
|
||||
|
|
|
@ -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'] = '';
|
||||
|
|
Loading…
Reference in New Issue