From a99e3b864276e1a5ae236a97c54b0e973177e051 Mon Sep 17 00:00:00 2001 From: wmwlwmwl <168271477+wmwlwmwl@users.noreply.github.com> Date: Wed, 29 Apr 2026 23:10:31 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E5=B7=B2=E6=9C=89=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E8=AE=B0=E5=BD=95=EF=BC=9A=E4=BF=AE=E6=94=B9=E6=B8=85?= =?UTF-8?q?=E7=A9=BA=E6=90=9C=E7=B4=A2=EF=BC=8C=E5=88=87=E6=8D=A2=E5=9F=9F?= =?UTF-8?q?=E5=90=8D=E6=B2=A1=E6=B8=85=E7=A9=BA=E6=90=9C=E7=B4=A2=EF=BC=8C?= =?UTF-8?q?=E8=BF=98=E6=9C=89=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=202.Clou?= =?UTF-8?q?dflare=E8=87=AA=E5=AE=9A=E4=B9=89=E4=B8=BB=E6=9C=BA=E5=90=8D?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0CF=E4=BC=98=E9=80=89=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E5=92=8C=E6=89=B9=E9=87=8FCF=E4=BC=98=E9=80=89=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=20(#456)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add files via upload 1.修复已有解析记录:修改清空搜索,切换域名没清空搜索,还有显示问题 2.Cloudflare自定义主机名添加CF优选解析和批量CF优选解析 * Add files via upload --- app/controller/Cloudflare.php | 21 +- app/view/cloudflare/hostnames.html | 891 ++++++++++++++++++++++++++++- app/view/domain/smartparse.html | 31 +- 3 files changed, 934 insertions(+), 9 deletions(-) diff --git a/app/controller/Cloudflare.php b/app/controller/Cloudflare.php index 4f2b8dd..2a2177b 100644 --- a/app/controller/Cloudflare.php +++ b/app/controller/Cloudflare.php @@ -432,7 +432,26 @@ class Cloudflare extends BaseController throw new Exception('解析线路列表为空'); } - return json(['code' => 0, 'data' => ['default_line' => strval($firstKey)]]); + $lines = []; + foreach ($recordLine as $lineValue => $lineLabel) { + if (is_array($lineLabel)) { + $lines[] = [ + 'value' => strval($lineValue), + 'label' => isset($lineLabel['name']) ? strval($lineLabel['name']) : strval($lineValue), + 'parent' => isset($lineLabel['parent']) ? ($lineLabel['parent'] !== null ? strval($lineLabel['parent']) : '') : '', + 'is_default' => ($lineValue === $firstKey) + ]; + } else { + $lines[] = [ + 'value' => strval($lineValue), + 'label' => strval($lineLabel), + 'parent' => '', + 'is_default' => ($lineValue === $firstKey) + ]; + } + } + + return json(['code' => 0, 'data' => ['default_line' => strval($firstKey), 'lines' => $lines]]); } catch (Exception $e) { return json(['code' => -1, 'msg' => $e->getMessage()]); } diff --git a/app/view/cloudflare/hostnames.html b/app/view/cloudflare/hostnames.html index 0f85d19..71bfc5f 100644 --- a/app/view/cloudflare/hostnames.html +++ b/app/view/cloudflare/hostnames.html @@ -59,6 +59,7 @@ + @@ -248,6 +249,55 @@ + +