From 5b677d4d1ffb922ab9c5311f03f5008447c73b2c Mon Sep 17 00:00:00 2001 From: root Date: Mon, 28 Sep 2026 12:19:13 +0000 Subject: [PATCH] =?UTF-8?q?fix(admin):=20=E6=B8=A0=E9=81=93=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=84=9A=E6=9C=AC=E5=9B=A0=20\$input=20=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Blade 原样输出反斜杠,整段 layui 脚本语法错误,表格不会请求数据。 Co-authored-by: Cursor --- resources/views/admin/channels/index.blade.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/views/admin/channels/index.blade.php b/resources/views/admin/channels/index.blade.php index 050ad4f..69a037c 100644 --- a/resources/views/admin/channels/index.blade.php +++ b/resources/views/admin/channels/index.blade.php @@ -261,16 +261,16 @@ layui.use(['table', 'form', 'layer'], function () { var isAppNow = data.value === 'app'; $('.LAY-ch-app-only').toggle(isAppNow); $('.LAY-ch-new-only').toggle(!isAppNow); - var \$input = $('#LAY-ch-id-input'); + var idInput = $('#LAY-ch-id-input'); if (isAppNow) { - \$input.attr('readonly', true).attr('maxlength', '').attr('placeholder', '自动生成 UUID'); - if (!\$input.val()) { + idInput.attr('readonly', true).attr('maxlength', '').attr('placeholder', '自动生成 UUID'); + if (!idInput.val()) { $.getJSON(@json(route('admin.channels.randomId')) + '?builder_type=app', function (res) { - if (res.code === 0) \$input.val(res.data.channel_id); + if (res.code === 0) idInput.val(res.data.channel_id); }); } } else { - \$input.removeAttr('readonly').attr('maxlength', '6').attr('placeholder', '例如 A.B.C1 或 3.1.07').val(''); + idInput.removeAttr('readonly').attr('maxlength', '6').attr('placeholder', '例如 A.B.C1 或 3.1.07').val(''); } }); },