|
@@ -1832,6 +1832,7 @@ class PublicRpcService implements PublicRpcServiceInterface
|
|
|
if (isset($sector['component_num']) && is_numeric($sector['component_num'])) {
|
|
|
$num = intval($sector['component_num']);
|
|
|
if ($num > 0 && $num <= 10) {
|
|
|
+// 使用 range 函数生成一个从 1 到 $num 的连续整数数组,存储到 $sector_arr 中
|
|
|
$sector_arr = range(1, $num);
|
|
|
} else {
|
|
|
$sector_arr = [];
|
|
@@ -1844,7 +1845,9 @@ class PublicRpcService implements PublicRpcServiceInterface
|
|
|
// return Result::success($sort);
|
|
|
}
|
|
|
if(!empty($sort)){
|
|
|
- $sort = array_values($sort);
|
|
|
+ $sort = array_values(array_map(function($value) {
|
|
|
+ return ['id' => $value];
|
|
|
+ }, $sort));
|
|
|
}else{
|
|
|
return Result::error("组件版式数量已达上限!");
|
|
|
}
|