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 };