From 0a21a1b7388d10c8ba48e282f49c145393db2439 Mon Sep 17 00:00:00 2001 From: "HDM58\\hdm58" Date: Mon, 15 Jan 2024 10:11:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=201=E3=80=81?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=A1=B9=E7=9B=AE=EF=BC=8C=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=B8=8D=E8=87=AA=E5=8A=A8=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E9=97=AE=E9=A2=98=202=E3=80=81=E6=96=B0=E5=A2=9E=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=8F=90=E7=A4=BA=E9=A1=B9=E7=9B=AE=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E5=B7=B2=E7=BB=8F=E5=AD=98=E5=9C=A8=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/project/validate/ProjectCheck.php | 9 ++------- app/project/view/index/view_overview.html | 4 +--- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/app/project/validate/ProjectCheck.php b/app/project/validate/ProjectCheck.php index 4a18329..8f82da1 100644 --- a/app/project/validate/ProjectCheck.php +++ b/app/project/validate/ProjectCheck.php @@ -5,22 +5,17 @@ use think\Validate; class ProjectCheck extends Validate { protected $rule = [ - 'name' => 'require|unique:project', - 'code' => 'alphaNum|length:5,10|unique:project', + 'name' => 'require', 'id' => 'require' ]; protected $message = [ 'name.require' => '项目名称不能为空', - 'name.unique' => '同样的项目名称已经存在', - 'code.alphaNum' => '项目代码只能为5至10为字母和数字', - 'code.length' => '项目代码只能为5至10为字母和数字', - 'code.unique' => '同样的项目代码已经存在', 'id.require' => '缺少更新条件', ]; protected $scene = [ - 'add' => ['name','code'], + 'add' => ['name'], 'edit' => ['id'] ]; } \ No newline at end of file diff --git a/app/project/view/index/view_overview.html b/app/project/view/index/view_overview.html index 0c262d7..c114279 100644 --- a/app/project/view/index/view_overview.html +++ b/app/project/view/index/view_overview.html @@ -365,9 +365,7 @@ function overview(){ layer.closeAll(); layer.msg(e.msg); if(e.code==0){ - setTimeout(function () { - location.href='/project/index/index'; - }, 1000) + tool.sideClose(1000); } } let postData = { "id": project_id };