浏览代码

修改接口:自助建站-通栏版式管理-获取通栏版式列表

15313670163 4 天之前
父节点
当前提交
14ee146b39
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      app/JsonRpc/PublicRpcService.php

+ 4 - 1
app/JsonRpc/PublicRpcService.php

@@ -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("组件版式数量已达上限!");
         }