From bf6c4590ee058f4e64434d4deee6d14f3dd99573 Mon Sep 17 00:00:00 2001 From: "AriFe.Liu" <88468560@qq.com> Date: Mon, 27 Jun 2022 03:27:27 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6=E5=9B=A0=E6=B2=A1=E6=9C=89?= =?UTF-8?q?id=E5=AF=BC=E8=87=B4=E6=97=A0=E6=B3=95=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=9A=84bug=20=E8=AF=A5=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E6=9B=BE=E5=AF=BC=E8=87=B4=E9=99=84=E4=BB=B6=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=9C=A8=E6=B2=A1=E6=9C=89=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?ID=E6=97=B6=E9=80=A0=E6=88=90=E6=97=A0=E6=B3=95=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E5=93=8D=E5=BA=94=E5=9B=9E=E8=B0=83=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=20=E5=AE=98=E6=96=B9=E6=96=87=E6=A1=A3:=20https://doc.fastadmi?= =?UTF-8?q?n.net/doc/183.html=20=E9=99=84=E4=BB=B6=E9=80=89=E6=8B=A9=20?= =?UTF-8?q?=E4=B8=AD,=20=E7=A4=BA=E4=BE=8B=E5=8F=8A=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=9D=87=E6=9C=AA=E6=8F=90=E5=8F=8A=E6=B7=BB=E5=8A=A0=E4=BA=86?= =?UTF-8?q?faselect=E7=9A=84=E7=BB=84=E4=BB=B6=E5=BF=85=E9=A1=BB=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0id=20=E5=A6=82=E9=9D=9Ebug=E8=80=8C=E6=9C=89=E6=84=8F?= =?UTF-8?q?=E4=B8=BA=E4=B9=8B,=20=E8=AF=B7=E4=BF=AE=E6=94=B9=E5=AE=98?= =?UTF-8?q?=E6=96=B9=E6=96=87=E6=A1=A3=E8=AF=B4=E6=98=8E,=20=E5=91=8A?= =?UTF-8?q?=E7=9F=A5=E7=94=A8=E6=88=B7=E6=B7=BB=E5=8A=A0=E4=BA=86faselect?= =?UTF-8?q?=E7=9A=84=E6=A0=87=E7=AD=BE=E5=BF=85=E9=A1=BB=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0ID=E6=89=8D=E8=83=BD=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E5=A4=84=E7=90=86=E5=9B=9E=E8=B0=83.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/js/require-form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/assets/js/require-form.js b/public/assets/js/require-form.js index 20e2a392..94a4ecf8 100755 --- a/public/assets/js/require-form.js +++ b/public/assets/js/require-form.js @@ -256,7 +256,7 @@ define(['jquery', 'bootstrap', 'upload', 'validator', 'validator-lang'], functio var url = $(this).data("url") ? $(this).data("url") : (typeof Backend !== 'undefined' ? "general/attachment/select" : "user/attachment"); parent.Fast.api.open(url + "?element_id=" + $(this).attr("id") + "&multiple=" + multiple + "&mimetype=" + mimetype + "&admin_id=" + admin_id + "&user_id=" + user_id, __('Choose'), { callback: function (data) { - var button = $("#" + $(that).attr("id")); + var button = $(that); var maxcount = $(button).data("maxcount"); var input_id = $(button).data("input-id") ? $(button).data("input-id") : ""; maxcount = typeof maxcount !== "undefined" ? maxcount : 0; From 34e4c6c1e5245bc93ed957b7e23b60b0cefa51bc Mon Sep 17 00:00:00 2001 From: "AriFe.Liu" <88468560@qq.com> Date: Sat, 13 Aug 2022 03:46:36 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8Diframe=E6=89=93=E5=BC=80?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E6=97=B6=E9=93=BE=E6=8E=A5=E5=86=85=E9=97=AE?= =?UTF-8?q?=E5=8F=B7=E9=87=8D=E5=A4=8D=E7=9A=84=E9=97=AE=E9=A2=98=20?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=9C=A8=E6=B7=BB=E5=8A=A0=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E6=97=B6,=20=E5=9C=A8=E8=A7=84=E5=88=99=E6=88=96URL=E4=B8=AD?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E4=BA=86=20=3F=20,=20=E5=88=99=E4=BC=9A?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=9C=A8=E5=88=B7=E6=96=B0=E8=BF=99=E4=B8=AA?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E9=A1=B5=E6=97=B6,=20=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E4=B8=AD=E4=BD=BF=E7=94=A8=E4=BA=86=E4=B8=A4?= =?UTF-8?q?=E4=B8=AA=E9=97=AE=E5=8F=B7=E5=AF=BC=E8=87=B4=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=8F=96=E5=87=BA=E9=94=99=E8=AF=AF,=20=E6=AD=A4=E5=A4=84?= =?UTF-8?q?=E5=8E=9F=E6=9C=AC=E8=BF=BD=E5=8A=A0=E7=9A=84=3Faddtabs=3D1?= =?UTF-8?q?=E6=9C=AA=E5=81=9A=E5=88=A4=E6=96=AD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: AriFe.Liu <88468560@qq.com> --- application/admin/view/index/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/admin/view/index/index.html b/application/admin/view/index/index.html index 0fd259a1..8faf4001 100644 --- a/application/admin/view/index/index.html +++ b/application/admin/view/index/index.html @@ -28,12 +28,12 @@
{if $fixedmenu}
- +
{/if} {if $referermenu}
- +
{/if}
From fb5972dd2cb8e6baef3dae3b3524609ce647cd37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=8F=E9=A9=AC?= <179906767@qq.com> Date: Fri, 9 Sep 2022 03:23:40 +0000 Subject: [PATCH 3/3] =?UTF-8?q?update=20application/admin/command/Crud.php?= =?UTF-8?q?.=20=E9=97=AE=E9=A2=98=EF=BC=9A=E5=88=A0=E9=99=A4=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E6=97=B6=E4=B8=8D=E9=9C=80=E8=A6=81=E5=BC=BA=E5=88=B6?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E6=95=B0=E6=8D=AE=E8=A1=A8=EF=BC=8C=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E5=9C=A8=E5=88=A0=E9=99=A4=E5=89=8D=E5=B7=B2=E6=89=8B?= =?UTF-8?q?=E5=8A=A8=E5=88=A0=E9=99=A4=E6=95=B0=E6=8D=AE=E8=A1=A8=EF=BC=8C?= =?UTF-8?q?=E5=B0=86=E6=8A=9B=E5=87=BA=E5=BC=82=E5=B8=B8=E2=80=9Ctable=20n?= =?UTF-8?q?ot=20found=E2=80=9D=E5=AF=BC=E8=87=B4=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复:增加删除模式判断,如果是删除模式,无需读取数据表 Signed-off-by: 苏小马 <179906767@qq.com> --- application/admin/command/Crud.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/application/admin/command/Crud.php b/application/admin/command/Crud.php index 390cb953..f41d951d 100755 --- a/application/admin/command/Crud.php +++ b/application/admin/command/Crud.php @@ -435,16 +435,19 @@ class Crud extends Command $modelName = $table = stripos($table, $prefix) === 0 ? substr($table, strlen($prefix)) : $table; $modelTableType = 'table'; $modelTableTypeName = $modelTableName = $modelName; - $modelTableInfo = $dbconnect->query("SHOW TABLE STATUS LIKE '{$modelTableName}'", [], true); - if (!$modelTableInfo) { - $modelTableType = 'name'; - $modelTableName = $prefix . $modelName; + $modelTableInfo = null; + if (!$input->getOption('delete')) { $modelTableInfo = $dbconnect->query("SHOW TABLE STATUS LIKE '{$modelTableName}'", [], true); if (!$modelTableInfo) { - throw new Exception("table not found"); + $modelTableType = 'name'; + $modelTableName = $prefix . $modelName; + $modelTableInfo = $dbconnect->query("SHOW TABLE STATUS LIKE '{$modelTableName}'", [], true); + if (!$modelTableInfo) { + throw new Exception("table not found"); + } } + $modelTableInfo = $modelTableInfo[0]; } - $modelTableInfo = $modelTableInfo[0]; $relations = []; //检查关联表 @@ -1069,7 +1072,7 @@ class Crud extends Command } //表注释 - $tableComment = $modelTableInfo['Comment']; + $tableComment = $modelTableInfo ? $modelTableInfo['Comment'] : ''; $tableComment = mb_substr($tableComment, -1) == '表' ? mb_substr($tableComment, 0, -1) . '管理' : $tableComment; $modelInit = '';