From 665646e8f536fd61c2a865cbdc69f391a1d69c3e Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Wed, 30 Oct 2019 11:31:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=9F=E5=8C=85=E4=B8=8D=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=20=20=E8=B4=A6=E5=8F=B7=E5=AF=86=E7=A0=81=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/Controller/UserController.class.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index 32884ca5..501f7392 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -790,6 +790,13 @@ class UserController extends BaseController #实例化用户接口 $userApi = new MemberApi(); + if(!preg_match('/^(?![^a-zA-Z]+$)(?!\D+$).{6,15}$/', $user['account'])){ + $this -> set_message(1027, "fail", "账号必须6-15位数字或字母"); + } + + if(!preg_match('/^(?![^a-zA-Z]+$)(?!\D+$).{6,15}$/', $user['password'])){ + $this -> set_message(1027, "fail", "密码必须6-15位数字或字母"); + } // user表加game_id if ($type == 2) {//手机2 $result = $userApi -> sdk_register_($user['account'], $user['password'], 1, 2, $user['promote_id'], get_promote_name($user['promote_id']), $user['account'], $user["game_id"], get_game_name($user["game_id"]), $user['sdk_version'] ,$user['device_type'],$user['unique_code']); @@ -2344,6 +2351,12 @@ class UserController extends BaseController if (empty($game_source)) { $game_source['source_version'] = 0; } + // 客户端传参0原包 不提示更新 source_version程序版本号 + if($request['source_version'] == 0) { + echo base64_encode(json_encode(array('code' => 200, 'msg' => '请求成功', 'data' => []))); + exit(); + } + $data['is_force_update'] = $game_info['is_force_update']; $data['source_version'] = $game_source['source_version']; $data['update_tips'] = '游戏已经更新,请下载最新游戏包~';