From acf2ff131016f1f7e68a6a0cd46d2a9b96077324 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 2 Dec 2019 10:47:52 +0800 Subject: [PATCH 1/3] ios13.1 --- Application/Mobile/Controller/UserController.class.php | 8 +++++--- Application/Mobile/View/User/register.html | 9 +-------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Application/Mobile/Controller/UserController.class.php b/Application/Mobile/Controller/UserController.class.php index abc338ad7..4a9c24b41 100644 --- a/Application/Mobile/Controller/UserController.class.php +++ b/Application/Mobile/Controller/UserController.class.php @@ -219,7 +219,6 @@ class UserController extends BaseController public function bindingPromote($promoteId, $account) { - Log::write('cxj_login:' . date('Y-m-d H:i:s') . ' ---- ' . $promoteId.'INFO'); if ($promoteId > 0) { $wherePromote['id'] = $promoteId; $promoteData = M('Promote', 'tab_')->field('id,account')->where($wherePromote)->find(); @@ -230,7 +229,6 @@ class UserController extends BaseController $whereUser['mobile_phone'] = $account; $userData = M('User', 'tab_')->where($whereUser)->find(); - Log::write('cxj_login:' . date('Y-m-d H:i:s') . ' ---- userData' . json_encode($userData) .'INFO'); if (!empty($userData)) { if (empty($userData['promote_id'])) { $saveData['promote_id'] = $promoteId; @@ -405,7 +403,11 @@ class UserController extends BaseController $pgInfo = strval(cookie('pgInfo')); Log::write('register:' . date('Y-m-d H:i:s') . ' ---- ' . json_encode($_POST) . ' --- ' . $pgInfo, 'INFO'); if (isset($_POST['promote_id']) && !empty($_POST['promote_id'])) { - $pid = $this->suser->register($phone, $password, $phone, $register_way, $register_type, $_POST['promote_id'], $_POST['promote_account'], $sex, $nickname, $head_img); + Log::write('cxj_register:' . date('Y-m-d H:i:s') . ' ---- post' . json_encode($_POST) .' --- INFO'); + $thisPromoteAccount = M('promote', 'tab_')->where(array('id' => $_POST['promote_id']))->getField('account'); + $thisPromoteAccount = !empty($thisPromoteAccount) ? $thisPromoteAccount : '自然注册'; + $promoteAccount = isset($_POST['promote_account']) ? $_POST['promote_account'] : $thisPromoteAccount; + $pid = $this->suser->register($phone, $password, $phone, $register_way, $register_type, $_POST['promote_id'], $promoteAccount, $sex, $nickname, $head_img); } else { $pid = $this->suser->register($phone, $password, $phone, $register_way, $register_type, '', '', $sex, $nickname, $head_img); } diff --git a/Application/Mobile/View/User/register.html b/Application/Mobile/View/User/register.html index 70db4d9d5..3dab79e91 100644 --- a/Application/Mobile/View/User/register.html +++ b/Application/Mobile/View/User/register.html @@ -59,14 +59,7 @@ var tis = this,that = $(tis); if (that.hasClass('disabled')) {return false;} var mobile = $.trim($('#mobile').val()); - var promoteId = parseInt("{:I('get.pid',0)}"); - var gameId = parseInt("{:I('get.gid',0)}"); - var data = {}; - if (promoteId > 0 && gameId > 0) { - data = {'phone':mobile,'promote_id':promoteId,'game_id':gameId}; - } else { - data = {'phone':mobile}; - } + var data = {'phone':mobile}; if (mobile) { if (/^1[0-9]{10}$/.test(mobile)) { $.ajax({ From fa9d40f87acbb0ee30cacc04d4b2235cdf6fa006 Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Mon, 2 Dec 2019 11:26:45 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A3=8E=E6=8E=A7?= =?UTF-8?q?=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/MemberController.class.php | 24 +++++++++++++++++++ .../Admin/View/Member/device_bans_edit.html | 5 +++- .../Admin/View/Member/device_bans_list.html | 4 +++- Data/update.sql | 6 ++++- 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index afde5599c..c57b0849f 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -1231,6 +1231,24 @@ class MemberController extends ThinkController } $list = M('device_bans', 'tab_')->where($map)->page($p, $row)->select(); $count = M('device_bans', 'tab_')->where($map)->count(); + if (!empty($list)) { + foreach ($list as &$item) { + switch ($item['type']) { + case '1': + $item['type_name'] = '设备号'; + break; + case '2': + $item['type_name'] = 'IP'; + break; + case '3': + $item['type_name'] = '落地页链接'; + break; + case '4': + $item['type_name'] = '下载链接'; + break; + } + } + } $page = set_pagination($count, $row); if ($page) { $this->assign('_page', $page); @@ -1249,9 +1267,15 @@ class MemberController extends ThinkController if (empty($type) || empty($tag)) { return $this->error("请填写完整信息"); } + if (\in_array($type, [3,4]) && !preg_match("/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/i", $tag)) { + return $this->error("请填写正确的url地址"); + } if ($type == 2 && !preg_match("/(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}/i", $tag)) { return $this->error("请填写正确的ip信息,如127.0.0.1"); } + if ($type == 1 && (preg_match("/(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}/i", $tag) || preg_match("/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/i", $tag))) { + return $this->error("请填写正确的设备信息"); + } $map['type'] = $type; $map['tag'] = $tag; $item = M('device_bans', 'tab_')->where($map)->find(); diff --git a/Application/Admin/View/Member/device_bans_edit.html b/Application/Admin/View/Member/device_bans_edit.html index 275ac0adc..5d1ba903d 100644 --- a/Application/Admin/View/Member/device_bans_edit.html +++ b/Application/Admin/View/Member/device_bans_edit.html @@ -11,10 +11,13 @@