Merge branch 'dev_lww' into dev_zcl

master
zhengchanglong 5 years ago
commit 65014bb66a

@ -139,7 +139,7 @@
</div>
</div>
</notempty>
<div class="hd_title mt35">
<!-- <div class="hd_title mt35">
<span class="title">
<span class="line"></span>
发表评论
@ -154,7 +154,7 @@
var width = window.innerWidth || document.documentElement.clientWidth;
if (width < 960) {
window.document.write('<script id="changyan_mobile_js" charset="utf-8" type="text/javascript" src="http://changyan.sohu.com/upload/mobile/wap-js/changyan_mobile.js?client_id=' + appid + '&conf=' + conf + '"><\/script>'); } else { var loadJs=function(d,a){var c=document.getElementsByTagName("head")[0]||document.head||document.documentElement;var b=document.createElement("script");b.setAttribute("type","text/javascript");b.setAttribute("charset","UTF-8");b.setAttribute("src",d);if(typeof a==="function"){if(window.attachEvent){b.onreadystatechange=function(){var e=b.readyState;if(e==="loaded"||e==="complete"){b.onreadystatechange=null;a()}}}else{b.onload=a}}c.appendChild(b)};loadJs("http://changyan.sohu.com/upload/changyan.js",function(){window.changyan.api.config({appid:appid,conf:conf})}); } })(); </script>
</div>
</div>-->
</div>
<div class="fr hotgame">
<div class="hot_title">

@ -44,7 +44,7 @@
</div>
</div>
<!-- 侧导航 -->
<div class="side_tabbar" style="z-index: 1">
<a class="side_tabbar" style="z-index: 1" href="http://wpa.qq.com/msgrd?v=3&amp;uin={:C('PC_SET_SERVER_QQ')}&amp;site=qq&amp;menu=yes" target="_blank">
<img src="__IMG__/index_about/qrcode.png" alt="">
</div>
</a>
</block>

@ -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'];

@ -31,7 +31,7 @@
<if condition="I('get.pid') gt 0">
<div class="promptly">还没有账号?<a style="margin-left: 10px;" href="<?='mobile.php?s=/User/step1/pid/'.I('get.pid').'/gid/'.I('get.gid').'.html'?>"> 账号注册 </a>|<a href="<?='mobile.php?s=/User/step/pid/'.I('get.pid').'/gid/'.I('get.gid').'.html'?>"> 手机注册 </a></div>
<else/>
<div class="promptly">还没有账号?<a style="margin-left: 10px;" href="{:U('User/step1')}"> 账号注册 </a>|<a href="{:U('User/step')}"> 手机注册 </a></div>
<div class="promptly">还没有账号?<a style="margin-left: 10px;" href="{:U('User/step1')}"> 账号注册 </a>|<a href="{:U('User/register')}"> 手机注册 </a></div>
</if>
</div>
</div>

@ -28,11 +28,16 @@
<div class="subpage-heard">手机注册
<a href="javascript:window.history.go(-1);" class="arrows"></a>
</div>
<div class="login-box">
<div class="login-input">
<img src="__IMG__/user/shouji.png" alt="">
<input type="text" id="mobile" placeholder="请输入手机号">
</div>
<div class="login-input">
<img src="__IMG__/user/suo.png" alt="">
<input id="password" type="password" placeholder="请输入密码">
</div>
<div class="login-code">
<input id="code" type="text" placeholder="输入验证码">
<div class="jsgetcode">获取验证码</div>
@ -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){

@ -28,10 +28,10 @@
<img src="__IMG__/new/suo.png" alt="">
<input type="password" placeholder="请输入密码" name="password" id="password" value="">
</div>
<div class="login-input">
<!--<div class="login-input">
<img src="__IMG__/new/nicheng.png" alt="">
<input type="text" placeholder="请输入昵称" name="nickname" id="nickname" value="">
</div>
</div>-->
<!-- <div class="login-gender">
<div class="title">
<img src="__IMG__/new/xingbie.png" alt="">
@ -81,10 +81,10 @@
pmsg.msg('账号不能为空');event.preventDefault();
return false;
}
if(nickname.length == 0 ){
/*if(nickname.length == 0 ){
pmsg.msg('昵称不能为空');event.preventDefault();
return false;
}
}*/
if(password.length == 0){
pmsg.msg('密码不能为空');event.preventDefault();
return false;

Loading…
Cancel
Save