From 917aad3d688ff095481e7de253f46a9903ae435a Mon Sep 17 00:00:00 2001 From: sa0ChunLuyu Date: Thu, 29 Dec 2022 13:36:20 +0800 Subject: [PATCH] no message --- app/Http/Controllers/AuthController.php | 1 + config/code.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php index 6bb3870..ada6a38 100644 --- a/app/Http/Controllers/AuthController.php +++ b/app/Http/Controllers/AuthController.php @@ -59,6 +59,7 @@ class AuthController extends Controller $auth = Auth::where('id', $id)->where('del', 2)->first(); if (!$auth) Yo::error_echo(100000, ['路由']); $type = $auth->type; + if ($pid === $id) Yo::error_echo(100029); if ($auth->pid != $pid) { if ($auth->pid == 0) { $s_auth = Auth::where('pid', $id)->where('del', 2)->count(); diff --git a/config/code.php b/config/code.php index 620f231..4a4564a 100644 --- a/config/code.php +++ b/config/code.php @@ -29,11 +29,12 @@ return [ 100020 => '路由长度在1-20位字符之间', 100021 => '图标长度在100位字符以内', 100022 => '排序在0-999之间', - 100023 => '该分组下游子级路由,不能移动', + 100023 => '该分组下有子级路由,不能移动', 100024 => '名称长度在1-50位字符之间', 100025 => '请输入内容', 100026 => '内容长度在1-1000位字符之间', 100027 => '图片类型不允许', 100028 => '图片上传失败,[?]', + 100029 => '不能设置为本身的子级路由', ];