From ffd14622cd995053f44ac5de7e1d0b07e760e85d Mon Sep 17 00:00:00 2001 From: air <30444667+sszdot@users.noreply.github.com> Date: Mon, 22 Sep 2025 18:39:13 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=20=20=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Afeat=20=E3=80=90=E5=8E=9F=20=20=E5=9B=A0=E3=80=91?= =?UTF-8?q?=EF=BC=9A=E5=A2=9E=E5=8A=A0=E5=9C=B0=E5=9B=BE=20=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E5=AD=97=E6=AE=B5=E8=AE=BE=E7=BD=AE=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=20=E3=80=90=E8=BF=87=20=20=E7=A8=8B=E3=80=91=EF=BC=9A=20?= =?UTF-8?q?=E3=80=90=E5=BD=B1=20=20=E5=93=8D=E3=80=91=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PlaneController.class.php | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/FlyCube/MpApi/Controller/PlaneController.class.php b/FlyCube/MpApi/Controller/PlaneController.class.php index 9f4e332..86f904a 100644 --- a/FlyCube/MpApi/Controller/PlaneController.class.php +++ b/FlyCube/MpApi/Controller/PlaneController.class.php @@ -1124,4 +1124,25 @@ class PlaneController extends PublicController )); } } + + /** + * @description: 修改地图样式的排序字段 + */ + public function orderMapStyle() + { + if (isset($_REQUEST['id']) && $_REQUEST['id'] !== '' && isset($_REQUEST['sort_order']) && $_REQUEST['sort_order'] !== '') { + $data['sort_order'] = (int)$_REQUEST['sort_order']; + // where 条件 + $where['id'] = $_REQUEST['id']; + // 录入数据库 + $mapStyleDb = D('map_styles'); + if ($mapStyleDb->where($where)->save($data) !== false) { + echo json_encode(array('status' => 1, 'msg' => '更新成功')); + } else { + echo json_encode(array('status' => 0, 'msg' => '更新失败')); + } + } else { + echo json_encode(array('status' => 0, 'msg' => '参数有误')); + } + } }