From ef8334dd180584e89ecafc56a359cde33a5fc2ac Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Tue, 24 Nov 2020 15:50:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9F=9F=E5=90=8D=E5=89=8D?= =?UTF-8?q?=E7=BC=80=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/PromoteCompanyController.class.php | 6 ++++++ Application/Admin/View/PromoteCompany/add.html | 2 +- Application/Admin/View/PromoteCompany/edit.html | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 5524c3c17..95d5c6488 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -1156,6 +1156,12 @@ class PromoteCompanyController extends ThinkController if ($save['site_domain_prefix'] == '') { $this->error('请输入推广后台域名前缀'); } + if (strlen($save['site_domain_prefix']) > 6) { + $this->error('域名前缀不能超过6个字符'); + } + if (!preg_match('/^[a-z0-9]+$/', $save['site_domain_prefix'])) { + $this->error('域名前缀只能由小写字母和数字组成'); + } if ($save['site_config']['icon'] == '') { $this->error('请上传推广后台ICON'); } diff --git a/Application/Admin/View/PromoteCompany/add.html b/Application/Admin/View/PromoteCompany/add.html index 02c90526a..670ef62f9 100644 --- a/Application/Admin/View/PromoteCompany/add.html +++ b/Application/Admin/View/PromoteCompany/add.html @@ -378,7 +378,7 @@ *推广后台域名前缀: - 请确保唯一。完整地址: + 请确保唯一,只能由小写字母和数字组成,不能超过6个字符。完整地址: diff --git a/Application/Admin/View/PromoteCompany/edit.html b/Application/Admin/View/PromoteCompany/edit.html index 14b45c62c..aa92e9a7f 100644 --- a/Application/Admin/View/PromoteCompany/edit.html +++ b/Application/Admin/View/PromoteCompany/edit.html @@ -387,7 +387,7 @@ } ?> - 请确保唯一。完整地址: + 请确保唯一,只能由小写字母和数字组成,不能超过6个字符。完整地址: