diff --git a/Application/Home/OrderNo/TakeColor.exe b/Application/Home/OrderNo/TakeColor.exe index 0be531018..7e87f74b4 100644 Binary files a/Application/Home/OrderNo/TakeColor.exe and b/Application/Home/OrderNo/TakeColor.exe differ diff --git a/Application/Media/View/default/Game/game_detail.html b/Application/Media/View/default/Game/game_detail.html index 49bc81019..8b4f8d3d0 100644 --- a/Application/Media/View/default/Game/game_detail.html +++ b/Application/Media/View/default/Game/game_detail.html @@ -139,7 +139,7 @@ -
+
diff --git a/Application/Media/View/default/Index/index.html b/Application/Media/View/default/Index/index.html index 3f70d1676..69443cbc9 100644 --- a/Application/Media/View/default/Index/index.html +++ b/Application/Media/View/default/Index/index.html @@ -44,7 +44,7 @@
-
+ -
+ \ No newline at end of file diff --git a/Application/Mobile/Controller/UserController.class.php b/Application/Mobile/Controller/UserController.class.php index 91893d0ab..5de27038d 100644 --- a/Application/Mobile/Controller/UserController.class.php +++ b/Application/Mobile/Controller/UserController.class.php @@ -272,7 +272,7 @@ class UserController extends BaseController $post = I('post.'); $account = $post['nickname']; $password = $post['password']; - $sex = $post['sex']; + $sex = isset($post['sex']) ? $post['sex'] : 0; if (empty($account)) { echo json_encode(array('status' => 0, 'msg' => '请填写昵称')); exit; @@ -307,13 +307,35 @@ class UserController extends BaseController */ public function register() { - $safeinfo = session('safeinfo'); - if ($safeinfo['status'] == 1) { +// $safeinfo = session('safeinfo'); +// if ($safeinfo['status'] == 1) { if (IS_POST) { + $post = I('post.'); + $account = $post['phone']; + $password = $post['password']; + $sex = isset($post['sex']) ? $post['sex'] : 0; + if (empty($account)) { + echo json_encode(array('status' => 0, 'msg' => '请输入手机号')); + exit; + } + if (empty($password)) { + echo json_encode(array('status' => 0, 'msg' => '请输入密码')); + exit; + } + + $promoteId = I('post.promote_id'); + $promoteId = intval($promoteId); + if ($promoteId > 0) { + $gameId = intval(I('post.game_id')); + $safeinfo = array('nickname' => $account, 'password' => $password, 'sex' => $sex, 'status' => 1, 'promote_id' => $promoteId, 'game_id' => $gameId); + } else { + $safeinfo = array('nickname' => $account, 'password' => $password, 'sex' => $sex, 'status' => 1); + } + $phone = $post['phone']; $safecode = $post['code']; - $nickname = $safeinfo['nickname']; + $nickname = 'U_' . substr($safeinfo['nickname'],-4); $password = $safeinfo['password']; $sex = $safeinfo['sex']; @@ -423,9 +445,9 @@ class UserController extends BaseController $this->assign('url', $url); $this->display(); } - } else { - $this->redirect(U('step')); - } +// } else { +// $this->redirect(U('step')); +// } } /** @@ -438,7 +460,8 @@ class UserController extends BaseController if (IS_POST) { $post = I('post.'); $account = $post['account']; - $nickname = $post['nickname']; +// $nickname = $post['nickname']; + $nickname = 'U_' . substr($account,-4);; $password = $post['password']; $sex = $post['sex']; diff --git a/Application/Mobile/Controller/login_res_text.txt b/Application/Mobile/Controller/login_res_text.txt new file mode 100644 index 000000000..0908a2128 --- /dev/null +++ b/Application/Mobile/Controller/login_res_text.txt @@ -0,0 +1 @@ +["20917"] \ No newline at end of file diff --git a/Application/Mobile/View/User/login.html b/Application/Mobile/View/User/login.html index f1b1f3097..d25a26c11 100644 --- a/Application/Mobile/View/User/login.html +++ b/Application/Mobile/View/User/login.html @@ -31,7 +31,7 @@
还没有账号? 账号注册 | 手机注册
-
还没有账号? 账号注册 | 手机注册
+
还没有账号? 账号注册 | 手机注册
diff --git a/Application/Mobile/View/User/register.html b/Application/Mobile/View/User/register.html index 867e8030c..87ca0f859 100644 --- a/Application/Mobile/View/User/register.html +++ b/Application/Mobile/View/User/register.html @@ -28,11 +28,16 @@
手机注册
+
+
+ + +
获取验证码
@@ -85,12 +90,19 @@ $('.submit').click(function(event) { var mobile = $.trim($('#mobile').val()); var code = $.trim($('#code').val()); + var password = $.trim($('#password').val()); + var promoteId = parseInt("{:I('get.pid')}") ? parseInt("{:I('get.pid')}") : 0; + var gameId = parseInt("{:I('get.gid')}") ? parseInt("{:I('get.gid')}") : 0; + if(password.length == 0){ + pmsg.msg('密码不能为空');event.preventDefault(); + return false; + } if (mobile) { if (code) { $.ajax({ type:'POST', url:'{:U("register")}', - data:{'phone':mobile,'code':code}, + data:{'phone':mobile,'code':code,'password':password,'promote_id':promoteId,'game_id':gameId}, dataType:"Json", success:function(data){ if(data.status == 1){ diff --git a/Application/Mobile/View/User/step1.html b/Application/Mobile/View/User/step1.html index 26ce78ec0..f91b94139 100644 --- a/Application/Mobile/View/User/step1.html +++ b/Application/Mobile/View/User/step1.html @@ -28,10 +28,10 @@
-
+