From 0ff9f77181909c5424140e3897819074222b39fc Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Thu, 2 Jan 2020 17:05:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E8=B5=84=E8=B4=A8?= =?UTF-8?q?=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/FileController.class.php | 45 + .../Controller/PromoteController.class.php | 120 +++ .../Admin/View/Promote/certification.html | 840 ++++++++++++++++++ Application/Admin/View/Promote/lists.html | 5 +- 4 files changed, 1009 insertions(+), 1 deletion(-) create mode 100644 Application/Admin/View/Promote/certification.html diff --git a/Application/Admin/Controller/FileController.class.php b/Application/Admin/Controller/FileController.class.php index bb6b721df..a9db7bd78 100644 --- a/Application/Admin/Controller/FileController.class.php +++ b/Application/Admin/Controller/FileController.class.php @@ -241,6 +241,51 @@ class FileController extends AdminController $this->ajaxReturn($return); } + /** + * 上传图片 + * @author huajie + */ + public function uploadPictureNotLimit() + { + //TODO: 用户登录检测 + + /* 返回标准数据 */ + $return = array('status' => 1, 'info' => '上传成功', 'data' => ''); + + /* 调用文件上传组件上传文件 */ + $Picture = D('Picture'); + $pic_driver = C('PICTURE_UPLOAD_DRIVER'); + + $info = $Picture->upload( + $_FILES, + C('PICTURE_UPLOAD'), + C('PICTURE_UPLOAD_DRIVER'), + C("UPLOAD_{$pic_driver}_CONFIG"), + $_REQUEST['flag'] + ); //TODO:上传到远程服务器 + + // 添加水印 +// if ($_REQUEST['flag']) { +// $this->addWatermarkOnPic($info['download']); +// } + + /* 记录图片信息 */ + if ($info) { + $return['status'] = 1; + if (empty($info['download'])) { + $file = $info['file']; + } else { + $file = $info['download']; + } + $return = array_merge($file, $return); + } else { + $return['status'] = 0; + $return['info'] = $Picture->getError(); + } + ob_clean(); + /* 返回JSON数据 */ + $this->ajaxReturn($return); + } public function uploadDoc() { diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index 9c3ccbb5a..c12a842f2 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -1137,4 +1137,124 @@ class PromoteController extends ThinkController $this->display(); } + + public function certification() + { + if ($_POST) { + $promoteId = intval(I('post.id', 0)); + if (empty($promoteId)) { + $this->error('参数异常'); + } + if (empty($_POST['real_name'])) { + $this->error('真实姓名不能为空'); + } + if (empty($_POST['idcard'])) { + $this->error('身份证号码不能为空'); + } + if(!is_idcard($_POST['idcard'])) { + $this->error('证件号码错误'); + } + if (empty($_POST['mobile_phone'])) { + $this->error('手机号码不能为空'); + } + $patternPhone = "/^1[3|5|7|8]\\d{9}$/i"; + if(!preg_match($patternPhone, $_POST['mobile_phone'])) { + $this->error("手机号码格式不合法"); + } + if (empty($_POST['idcarpic'])) { + $this->error('身份证证件照不能为空'); + } + if (empty($_POST['s_province'])) { + $this->error('联系省份不能为空'); + } + if (empty($_POST['s_city'])) { + $this->error('联系地级市不能为空'); + } + if (empty($_POST['s_county'])) { + $this->error('联系市、县级市不能为空'); + } + if (empty($_POST['s_address'])) { + $this->error('详细地址不能为空'); + } + if (empty($_POST['email'])) { + $this->error('邮箱不能为空'); + } + $patternEmail = "/^([0-9A-Za-z\\-_\\.]+)@([0-9a-z]+\\.[a-z]{2,3}(\\.[a-z]{2})?)$/i"; + if (!preg_match($patternEmail, $_POST['email'])) { + $this->error('邮箱地址错误'); + } + if (empty($_POST['account_type'])) { + $this->error('账户类型不能为空'); + } + if (empty($_POST['bank_name'])) { + $this->error('开户银行不能为空'); + } + if (empty($_POST['bank_account'])) { + $this->error('银行户名不能为空'); + } + $patternBankAccount = "/^[\x{4e00}-\x{9fa5}]{2,}$/u"; + if (!preg_match($patternBankAccount, $_POST['bank_account'])) { + $this->error('银行卡开户人姓名错误'); + } + if (empty($_POST['bank_card'])) { + $this->error('卡号不能为空'); + } + $patternBankCard = "/^\d{10,19}$/u"; + if (!preg_match($patternBankCard, $_POST['bank_card'])) { + $this->error('卡号格式错误'); + } + + $save['id'] = $promoteId; + $save['ver_status'] = 1; + $save['real_name'] = I('post.real_name', ''); + $save['idcard'] = I('post.idcard', ''); + $save['idcarpic'] = I('post.idcarpic', ''); + $save['mobile_phone'] = I('post.mobile_phone', ''); + $save['address'][] = I('post.s_province', '') . ',' . I('post.s_city', '') . ',' . I('post.s_county', ''); + $save['address'][] = I('post.s_address', ''); + $save['address'] = json_encode($save['address']); + $save['email'] = I('post.email', ''); + $save['account_type'] = intval(I('post.account_type', 1)); + $save['bank_name'] = I('post.bank_name', ''); + $save['bank_account'] = I('post.bank_account', ''); + $save['bank_card'] = I('post.bank_card', ''); + if (isset($_POST['businesspic'])) { + $save['businesspic'] = I('post.businesspic', ''); + } + if (isset($_POST['agreementpic'])) { + $save['agreementpic'] = I('post.agreementpic', ''); + } + if (isset($_POST['anothpic'])) { + $save['anothpic'] = I('post.anothpic', ''); + } + + $result = D('promote')->save($save); + if ($result === false) { + $this->error('操作失败'); + } else { + $this->success('操作成功'); + } + } else { + $promoteId = intval(I('id', 0)); + if ($promoteId <= 0) { + $this->error('参数错误'); + } + + $promote = D('promote')->where(array('id' => $promoteId))->find(); + $promote['idcarpic_array'] = $promote['idcarpic'] ? explode(',', $promote['idcarpic']) : []; + $promote['businesspic_array'] = $promote['businesspic'] ? explode(',', $promote['businesspic']) : []; + $promote['agreementpic_array'] = $promote['agreementpic'] ? explode(',', $promote['agreementpic']) : []; + $promote['anothpic_array'] = $promote['anothpic'] ? explode(',', $promote['anothpic']) : []; + $promote['address'] = json_decode($promote['address'], true); + if (!empty($promote['address'])) { + foreach ($promote['address'] as &$address) { + $address = explode(',', $address); + } + } + + $this->assign('records', $promote); + $this->assign('meta_title', '资质认证'); + $this->display(); + } + } } diff --git a/Application/Admin/View/Promote/certification.html b/Application/Admin/View/Promote/certification.html new file mode 100644 index 000000000..033a38efc --- /dev/null +++ b/Application/Admin/View/Promote/certification.html @@ -0,0 +1,840 @@ + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
会长账号: + + 通过推广员后台注册申请或者管理后台创建的账号 +
*真实姓名: + + +
*身份证号码: + + +
*身份证照: + + +
+
+
上传图片
+
+ +
+ +
+
+
+ 请上传身份证正反面,图片为jpg、png格式(不超过2M) +
营业执照: + + +
+
+
上传图片
+
+ +
+ +
+
+
+ 如果是公司请上传营业执照 +
合作合同: + + +
+
+
上传图片
+
+ +
+ +
+
+
+ 须上传平台与贵公司(工作室)签署的合作合同 +
补充认证: + + +
+
+
上传图片
+
+ +
+ +
+
+
+ +
*电话: + + +
*联系地址 +
+
+    +    + + + + + +
+
+
+ +
*邮箱: + + +
*账户类型: + + + + +
*开户银行: + + +
*银行户名: + + +
*银行账号: + + +
+
+ + +
+ + + 返回 + +
+
+
+
+ + + +
+ + + + if(C('COLOR_STYLE')=='blue_color') echo ''; + + + + + + + + + + diff --git a/Application/Admin/View/Promote/lists.html b/Application/Admin/View/Promote/lists.html index 0aa7f9d25..6db8d895d 100644 --- a/Application/Admin/View/Promote/lists.html +++ b/Application/Admin/View/Promote/lists.html @@ -7,6 +7,7 @@ +