From 9bc512722340472b9788e44b15992c360a7cc7eb Mon Sep 17 00:00:00 2001 From: jbrazz <2436953959@qq.com> Date: Wed, 23 Oct 2019 11:29:21 +0800 Subject: [PATCH] upt --- .../Home/Controller/PromoteController.class.php | 9 +++++++++ .../Home/View/default/Promote/add_chlid.html | 14 ++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index 890c04244..037cb7b5f 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -860,6 +860,15 @@ class PromoteController extends BaseController $this->ajaxReturn(array('status' => -1, 'msg' => '身份证格式错误')); } } + if (mb_strlen($_POST['account']) < 6 || mb_strlen($_POST['account']) > 15) { + $this->error('账号长度为6-15个字符', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0)))); + return false; + } + + if (mb_strlen($_POST['real_name']) < 2 || mb_strlen($_POST['real_name']) > 4) { + $this->error('姓名长度为2-4个字符', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0)))); + return false; + } $res = $user->promote_add($_POST); if (is_numeric($res)) { diff --git a/Application/Home/View/default/Promote/add_chlid.html b/Application/Home/View/default/Promote/add_chlid.html index e87d01b21..5d9d63c2a 100644 --- a/Application/Home/View/default/Promote/add_chlid.html +++ b/Application/Home/View/default/Promote/add_chlid.html @@ -37,13 +37,13 @@