From d941477d470122b39c54a93032b9bd06e855f83b Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Tue, 19 Nov 2019 18:09:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A3=80=E7=B4=A2=20?= =?UTF-8?q?=E8=B5=84=E8=B4=A8=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/QueryController.class.php | 6 ++ .../Home/Controller/SafeController.class.php | 56 ++++++++---- .../Home/View/default/Query/achievement.html | 4 +- .../View/default/Safe/modifyBaseInfo.html | 91 +++++++++---------- Data/update.sql | 7 ++ 5 files changed, 92 insertions(+), 72 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 0d006d0ea..840ee9872 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1906,6 +1906,11 @@ class QueryController extends BaseController public function achievement() { $time = I('time', date('Y-m-d')); + if(!empty($time)) { + $defaultTime = $time ; + }else { + $defaultTime = date('Y-m-d',time()); + } $sdkVersion = I('sdk_version', 0); $gameId = I('game_id', 0); $serverId = I('server_id', 0); @@ -2065,6 +2070,7 @@ class QueryController extends BaseController $this->assign('parentid', $parentId); $this->assign('count', $count); $this->assign('timeout', $timeout); + $this->assign('time',$defaultTime); $this->display(); } diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php index 2b21a142c..288e53af0 100644 --- a/Application/Home/Controller/SafeController.class.php +++ b/Application/Home/Controller/SafeController.class.php @@ -319,28 +319,8 @@ class SafeController extends BaseController{ $addressArr = explode(',', json_decode($address)[0]); $promoteInfo['addressdata'] = $addressArr; $this->assign('addr',json_decode($address)[1]); - }else { - $this->assign('addr','未填写地址'); } $promoteInfo['address'] = json_decode($address); - if(empty($promoteInfo['bank_card'])) { - $promoteInfo['bank_card'] = " "; - } - if(empty($promoteInfo['email'])) { - $promoteInfo['email'] = " "; - } - if(empty($promoteInfo['real_name'])) { - $promoteInfo['real_name'] = " "; - } - if(empty($promoteInfo['mobile_phone'])) { - $promoteInfo['mobile_phone'] = " "; - } - if(empty($promoteInfo['bank_name'])) { - $promoteInfo['bank_name'] = " "; - } - if(empty($promoteInfo['idcard'])) { - $promoteInfo['idcard'] = " "; - } $this->assign("ver_status",$promoteInfo['ver_status']); $this->assign('promoteinfo', $promoteInfo); @@ -377,6 +357,42 @@ class SafeController extends BaseController{ $account_type = $_REQUEST["account_type"]; $bank = $_REQUEST["bank"]; $agreementpic = $_REQUEST["agreementpic"]; + if(empty($tel)) { + $this->error("手机号码不能为空"); + return false; + } + $pattern = "/^1[3|5|7|8]\\d{9}$/i"; + if(!preg_match($pattern, $tel)) { + $this->error("手机号码格式不合法"); + return false; + } + + if(empty($address1)) { + $this->error("地址不能为空"); + return false; + } + if(empty($email)) { + $this->error("邮箱不能为空"); + return false; + } + $patternemail = "/^([0-9A-Za-z\\-_\\.]+)@([0-9a-z]+\\.[a-z]{2,3}(\\.[a-z]{2})?)$/i"; + if (!preg_match($patternemail, $email)) { + $this->error('邮箱地址错误'); + return false; + } + if(empty($bank)) { + $this->error("卡号不能为空"); + return false; + } + $bank_card_pattern = "/^\d{10,19}$/u"; + if (!preg_match($bank_card_pattern, $bank)) { + $this->error('卡号格式错误'); + return false; + } + if(empty($agreementpic)) { + $this->error("补充协议不能为空"); + return false; + } $Res = M("promote","tab_")->field('address')->where(['id'=>$id])->find(); $address = json_decode($Res['address'],false); $address[1] = $address1; diff --git a/Application/Home/View/default/Query/achievement.html b/Application/Home/View/default/Query/achievement.html index b295ed228..b2c1a9bb4 100644 --- a/Application/Home/View/default/Query/achievement.html +++ b/Application/Home/View/default/Query/achievement.html @@ -61,14 +61,14 @@
- +
0):?>
- 返回上级 + 返回上级
diff --git a/Application/Home/View/default/Safe/modifyBaseInfo.html b/Application/Home/View/default/Safe/modifyBaseInfo.html index 1ace1661e..e645fd7a8 100644 --- a/Application/Home/View/default/Safe/modifyBaseInfo.html +++ b/Application/Home/View/default/Safe/modifyBaseInfo.html @@ -84,23 +84,21 @@ *真实姓名: - - - - - - + + + + + *身份证号码: - - - - - - + + + + + @@ -200,12 +198,11 @@ *电话: - - - - - - + + + + + @@ -218,12 +215,11 @@       - - - - - - + + + + +