Merge branch 'dev_lww' into dev

master
zhengchanglong 5 years ago
commit 286febdff6

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

@ -9,7 +9,8 @@
<title>订单详情</title>
<link href="__CSS__/ssg/common.css" rel="stylesheet" type="text/css">
<script src="/Public/Mobile/js/ssg/flexible.min.js" type="text/javascript"></script>
<link href="__CSS__/common-cz.css" rel="stylesheet" >
</head>
<body class="install-box">
<div class="title" >
@ -58,11 +59,13 @@
<script src="__JS__/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="__JS__/ssg/clipboard.min.js" type="text/javascript"></script>
</body>
<div class="popmsg pop-dialog"></div>
<script src="__JS__/pop.lwx.min.js"></script>
<script>
var pmsg = $('.popmsg').pop();
var clipboard = new ClipboardJS(".code-btn1455");
clipboard.on('success', function (e) {
alert("复制成功");
pmsg.msg("复制成功");
});
clipboard.on('error', function (e) {
var ua = navigator.userAgent;

@ -97,7 +97,7 @@
</div>
<div class="formitem">
<img src="__IMG__/ssg/login/password.png">
<input id="phonepassword" type="password" placeholder="请输入6-12位字母组合密码" value="">
<input id="phonepassword" type="password" placeholder="请输入6-12位密码" value="">
</div>
<div class="formitem" style="border: 0px;">
<div class="formitem" style="margin-right: .2rem;margin-top: 0px;width: 3.5rem;">
@ -135,11 +135,11 @@
</div>
<div class="formitem" style="margin-top: 0px;">
<img src="__IMG__/ssg/login/user.png">
<input id="regaccount" type="text" placeholder="请输入账号(6-12位字母数字组合)" value="">
<input id="regaccount" type="text" placeholder="请输入账号(6-15位字母数字组合)" value="">
</div>
<div class="formitem">
<img src="__IMG__/ssg/login/password.png">
<input id="regpassword" type="password" placeholder="请输入6-12位字母组合密码" value="">
<input id="regpassword" type="password" placeholder="请输入6-12位密码" value="">
</div>
<div class="formitem">
<img src="__IMG__/ssg/login/password.png">
@ -267,15 +267,15 @@ var PhoneObj = {
},
checkPassword(password){
console.log(password);
if(password.length < 6 || password.length > 15){
alert('密码长度6-15个字符');
return false;
}
var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])');
if (!pwdRegex.test(password)) {
alert("您的密码复杂度太低(密码中必须包含字母、数字)!");
if(password.length < 6 || password.length > 12){
alert('密码长度6-12个字符');
return false;
}
// var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])');
// if (!pwdRegex.test(password)) {
// alert("您的密码复杂度太低(密码中必须包含字母、数字)!");
// return false;
// }
var chinaRex = new RegExp("[\\u4E00-\\u9FFF]+","g");;
if (chinaRex.test(password)) {
alert("密码不允许含有中文字符!");
@ -435,12 +435,12 @@ var PhoneObj = {
var regpassword2 = $("#regpassword2").val();
var promoteId = $("#promote_id").val();
var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])');
if(account.length < 6 || account.length > 12){
alert('账号长度必须是6-12位');
if(account.length < 6 || account.length > 15){
alert('账号长度必须是6-15位');
return false;
}
if (!pwdRegex.test(account)) {
alert("账号必须是6-12位字母数字组合!");
alert("账号必须是6-15位字母数字组合!");
return false;
}
if(!PhoneObj.checkPassword(regpassword)){

@ -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