Merge remote-tracking branch 'origin/release-1.0.0' into release-1.0.0

master
liuweiwen 5 years ago
commit ed0283aff6

@ -460,6 +460,7 @@ class PayChannelController extends ThinkController
->select(false); ->select(false);
// var_dump($spendData);die(); // var_dump($spendData);die();
$coinMap['pay_status'] = 1; $coinMap['pay_status'] = 1;
$coinMap['pay_source'] = 2;
$coinData = M('pay_info','tab_') $coinData = M('pay_info','tab_')
->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number") ->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number")
->field("pay_order_number,tab_deposit.create_time as pay_time,tab_deposit.user_account,tab_pay_info.game_name,tab_deposit.promote_account, ->field("pay_order_number,tab_deposit.create_time as pay_time,tab_deposit.user_account,tab_pay_info.game_name,tab_deposit.promote_account,

@ -237,6 +237,9 @@ class HomeController extends Controller
$downloadUrl = $applyService->getDownloadUrl($apply); $downloadUrl = $applyService->getDownloadUrl($apply);
} }
$serviceQQ = M("config", "sys_")->field('value')->where("name='APP_QQ'")->find()['value'];
$this->assign("serviceQQ", $serviceQQ);
$this->assign('isNewIos', $isNewIos); $this->assign('isNewIos', $isNewIos);
$this->assign('downloadUrl', $downloadUrl); $this->assign('downloadUrl', $downloadUrl);
$this->assign('isIOS13', $isIOS13); $this->assign('isIOS13', $isIOS13);

@ -33,6 +33,7 @@
<input type="hidden" name="isIOS13" value="<?php if($isIOS13):?>1<?php else:?>0<?php endif;?>"> <input type="hidden" name="isIOS13" value="<?php if($isIOS13):?>1<?php else:?>0<?php endif;?>">
<input type="hidden" name="isNewIos" value="<?php if($isNewIos):?>1<?php else:?>0<?php endif;?>"> <input type="hidden" name="isNewIos" value="<?php if($isNewIos):?>1<?php else:?>0<?php endif;?>">
<input type="hidden" name="supersign_status" value="{$game['supersign_status']}" id="supersign_status"> <input type="hidden" name="supersign_status" value="{$game['supersign_status']}" id="supersign_status">
<input type="hidden" name="betaUrl" value="{$game['beta_url']}">
<?php if ($isWechat):?> <?php if ($isWechat):?>
<?php if ($isAndroid):?> <?php if ($isAndroid):?>
@ -379,9 +380,9 @@
<div class="input-code"> <div class="input-code">
<div> <div>
<img src="__IMG__/20191225/yanzhengma.png" alt=""> <img src="__IMG__/20191225/yanzhengma.png" alt="">
<input id="verifyCode" name="verify_code" type="text" placeholder="请输入验证码"> <input name="verify_code" type="text" placeholder="请输入验证码">
</div> </div>
<img src="/mobile.php?s=/Common/verify.html" alt=""> <img id="verifyCode" src="/mobile.php?s=/Common/verify.html" alt="">
</div> </div>
<div class="register-btn"> <div class="register-btn">
<div id="loginBtn" class="loginBtn">登录</div> <div id="loginBtn" class="loginBtn">登录</div>
@ -394,7 +395,7 @@
</div> </div>
<div> <div>
<img src="__IMG__/20191225/kefu.png" alt=""> <img src="__IMG__/20191225/kefu.png" alt="">
<span>联系客服</span> <span class="service_qq">联系客服</span>
</div> </div>
</div> </div>
</div> </div>
@ -423,7 +424,7 @@
</div> </div>
<div id="forgetGetPhoneCode" class="gain">获取验证码</div> <div id="forgetGetPhoneCode" class="gain">获取验证码</div>
</div> </div>
<div class="modification">修改密码</div> <div id="modify-password" class="modification">修改密码</div>
<div class="register-forget"> <div class="register-forget">
<div> <div>
<div> <div>
@ -433,7 +434,7 @@
</div> </div>
<div> <div>
<img src="__IMG__/20191225/kefu.png" alt=""> <img src="__IMG__/20191225/kefu.png" alt="">
<span>联系客服</span> <span class="service_qq">联系客服</span>
</div> </div>
</div> </div>
</div> </div>
@ -449,7 +450,7 @@
<div class="register-input"> <div class="register-input">
<div class="input-box"> <div class="input-box">
<img src="__IMG__/20191225/yonghu.png" alt=""> <img src="__IMG__/20191225/yonghu.png" alt="">
<input name="phone" type="text" placeholder="请输入手机号"> <input name="mobile" type="text" placeholder="请输入手机号">
</div> </div>
<div class="input-box"> <div class="input-box">
<img src="__IMG__/20191225/mima.png" alt=""> <img src="__IMG__/20191225/mima.png" alt="">
@ -462,7 +463,7 @@
</div> </div>
<div id="getPhoneCode" class="gain">获取验证码</div> <div id="getPhoneCode" class="gain">获取验证码</div>
</div> </div>
<div id="phonereg" class="modification">立即注册</div> <div id="mobile-reg" class="modification">立即注册</div>
<div class="register-forget"> <div class="register-forget">
<div> <div>
<div style="color:#292929;font-size: 0.22rem;">注册即表示同意</div> <div style="color:#292929;font-size: 0.22rem;">注册即表示同意</div>
@ -496,7 +497,7 @@
<img src="__IMG__/20191225/mima.png" alt=""> <img src="__IMG__/20191225/mima.png" alt="">
<input name="repassword" type="password" placeholder="请再次确认输入密码"> <input name="repassword" type="password" placeholder="请再次确认输入密码">
</div> </div>
<div class="modification">立即注册</div> <div id="normal-reg" class="modification">立即注册</div>
<div class="register-forget"> <div class="register-forget">
<div> <div>
<div style="color:#292929;font-size: 0.22rem;">注册即表示同意</div> <div style="color:#292929;font-size: 0.22rem;">注册即表示同意</div>
@ -526,7 +527,7 @@
</div> </div>
<a href="#" class="mounting-btn">点击安装TestFlight平台</a> <a href="#" class="mounting-btn">点击安装TestFlight平台</a>
<div class="title-two">第二步:点击下方按钮安装游戏</div> <div class="title-two">第二步:点击下方按钮安装游戏</div>
<a href="#" class="mounting-btn">点击安装游戏</a> <a id="beta-url" href="#" class="mounting-btn">点击安装游戏</a>
</div> </div>
</div> </div>
</div> </div>
@ -567,42 +568,42 @@ var PhoneObj = {
}, },
//获取验证码 //获取验证码
sendPhoneCode:function(phone, fun){ sendPhoneCode:function(phone, fun){
if(PhoneObj.codeflag){ if(PhoneObj.codeflag){
if(PhoneObj.checkPhone(phone)){ if(PhoneObj.checkPhone(phone)){
//无需等待网络响应直接倒计时 //无需等待网络响应直接倒计时
fun() fun()
//获取验证码 //获取验证码
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
url: 'mobile.php?s=/Common/sendPhoneCode.html&phone='+phone, url: 'mobile.php?s=/Common/sendPhoneCode.html&phone='+phone,
dataType: 'JSON', dataType: 'JSON',
success: function (result) { success: function (result) {
if (result.status != '0000') { if (result.status != '0000') {
alert(result.msg); alert(result.msg);
} }
}
})
} }
}else{ })
// alert("发送验证码频率过高,请等待"+PhoneObj.i+"秒后再试")
} }
}else{
// alert("发送验证码频率过高,请等待"+PhoneObj.i+"秒后再试")
}
}, },
checkPassword(password){ checkPassword(password){
if(password.length < 6 || password.length > 12){ if(password.length < 6 || password.length > 12){
alert('密码长度6-12个字符'); alert('密码长度6-12个字符');
return false; return false;
} }
// var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])'); // var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])');
// if (!pwdRegex.test(password)) { // if (!pwdRegex.test(password)) {
// alert("您的密码复杂度太低(密码中必须包含字母、数字)!"); // alert("您的密码复杂度太低(密码中必须包含字母、数字)!");
// return false; // return false;
// } // }
var chinaRex = new RegExp("[\\u4E00-\\u9FFF]+","g");; var chinaRex = new RegExp("[\\u4E00-\\u9FFF]+","g");;
if (chinaRex.test(password)) { if (chinaRex.test(password)) {
alert("密码不允许含有中文字符!"); alert("密码不允许含有中文字符!");
return false; return false;
} }
return true; return true;
} }
} }
@ -620,7 +621,7 @@ var PhoneObj = {
$("#getPhoneCode").on("click",function(){ $("#getPhoneCode").on("click",function(){
//获取手机 //获取手机
var dom = $(this); var dom = $(this);
var phone = $('#phoneval').val(); var phone = $('#phone-register-box').find('[name=mobile]').val();
PhoneObj.sendPhoneCode(phone,function(){ PhoneObj.sendPhoneCode(phone,function(){
PhoneObj.countDown(dom); PhoneObj.countDown(dom);
}); });
@ -628,7 +629,7 @@ var PhoneObj = {
$("#forgetGetPhoneCode").on("click",function(){ $("#forgetGetPhoneCode").on("click",function(){
//获取手机 //获取手机
var dom = $(this); var dom = $(this);
var phone = $('#forgetPhoneval').val(); var phone = $('#forget-box').find('[name=mobile]').val();
PhoneObj.sendPhoneCode(phone,function(){ PhoneObj.sendPhoneCode(phone,function(){
PhoneObj.countDown(dom); PhoneObj.countDown(dom);
}); });
@ -679,13 +680,22 @@ var PhoneObj = {
$("input").click(function(){ $("input").click(function(){
event.stopPropagation(); event.stopPropagation();
}) })
$(".service_qq").on("click",function(){
window.location.href = 'mqqwpa://im/chat?chat_type=wpa&uin={$serviceQQ}&version=1&src_type=web&web_src=oicqzone.com';
})
$('#verifyCode').on({
click: function () {
GetVerityCode()
}
})
function GetVerityCode() { function GetVerityCode() {
//刷新验证码 //刷新验证码
$("#verifyCode").attr("src", "/mobile.php?s=/Common/verify.html&id=" + Math.random()); $("#verifyCode").attr("src", "/mobile.php?s=/Common/verify.html&id=" + Math.random());
} }
$("#phonereg").on("click",function(){ $("#mobile-reg").on("click",function(){
var box = $('#phone-register-box') var box = $('#phone-register-box')
var phone = box.find('[name=mobile]').val() var phone = box.find('[name=mobile]').val()
var password = box.find('[name=password]').val() var password = box.find('[name=password]').val()
@ -707,17 +717,17 @@ var PhoneObj = {
data:{ data:{
account: phone, account: phone,
password: password, password: password,
code: verifyCode, verify_code: verifyCode,
promote_id: promoteId, promote_id: promoteId,
game_id:gameId, game_id:gameId,
}, },
success: function (result) { success: function (result) {
console.log(result) if (result.code == '0000') {
if (result.return_code == 'fail') { $(".phone").hide();
alert(result.return_msg); $('.mounting').show();
$('#beta-url').attr('href', $('[name=betaUrl]').val())
} else { } else {
$("#alert_box").show(); alert(result.msg)
setTimeout(hideAndLogin,2500)
} }
} }
}) })
@ -749,7 +759,7 @@ var PhoneObj = {
url: 'mobile.php?s=/Common/login.html', url: 'mobile.php?s=/Common/login.html',
data: { data: {
'account': account, 'account': account,
'password': window.btoa(password), 'password': password,
'verify_code': verifyCode, 'verify_code': verifyCode,
'promote_id': promoteId, 'promote_id': promoteId,
}, },
@ -760,18 +770,20 @@ var PhoneObj = {
async: false, async: false,
cache: false, cache: false,
success: function (result) { success: function (result) {
if (result.code != 0) { if (result.code == '0000') {
alert(result.msg); $('.login').hide();
GetVerityCode(); $('.mounting').show();
$('#beta-url').attr('href', $('[name=betaUrl]').val())
} else { } else {
alert(result.msg);
} }
GetVerityCode();
} }
}); });
}) })
//普通注册 //普通注册
$("#userreg").on("click", function(){ $("#normal-reg").on("click", function(){
var box = $('#register-box') var box = $('#register-box')
var account = box.find('[name=account]').val() var account = box.find('[name=account]').val()
var password = box.find('[name=password]').val() var password = box.find('[name=password]').val()
@ -797,29 +809,27 @@ var PhoneObj = {
} }
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: 'mobile.php?s=/Ssg/userRegister.html', url: 'mobile.php?s=/Common/userRegister.html',
dataType: 'JSON', dataType: 'JSON',
data:{ data:{
account: account, account: account,
password: regpassword, password: password,
promote_id: promoteId promote_id: promoteId
}, },
success: function (result) { success: function (result) {
if (result.return_code == 'fail') { if (result.code == '0000') {
alert(result.return_msg); $(".common").hide();
} else { $('.mounting').show();
//成功 $('#beta-url').attr('href', $('[name=betaUrl]').val())
$("#alert_box").show(); } else {
setTimeout(hideAndLogin,2500) alert(result.msg)
// alert("注册并登陆成功"); }
// window.location.href = "mobile.php?s=/Ssg/index.html"
}
} }
}) })
}) })
//忘记密码 //忘记密码
$("#forgetBtn").on("click",function(){ $("#modify-password").on("click",function(){
var box = $('#forget-box') var box = $('#forget-box')
var phone = box.find('[name=mobile]').val() var phone = box.find('[name=mobile]').val()
var password = box.find('[name=password]').val() var password = box.find('[name=password]').val()
@ -844,13 +854,12 @@ var PhoneObj = {
verify_code: verifyCode verify_code: verifyCode
}, },
success: function (result) { success: function (result) {
console.log(result) if (result.code == '0000') {
if (result.return_code == 'fail') { alert('修改成功,请用新密码登录!')
alert(result.return_msg); $(".login").show();
$(".forgetPass").hide();
} else { } else {
$("#alert_content").html("密码修改成功,系统将在三秒后自动登录"); alert(result.msg)
$("#alert_box").show();
setTimeout(hideAndLogin,2500)
} }
} }
}) })

@ -385,12 +385,12 @@ class BaseController extends Controller {
return M("bind_recharge","tab_")->add($data); return M("bind_recharge","tab_")->add($data);
} }
protected function respondSuccess($message, $code = '0000') protected function respondSuccess($message = '成功', $code = '0000')
{ {
$this->respond($message, $code); $this->respond($message, $code);
} }
protected function respondError($message, $code = '1000') protected function respondError($message = '失败', $code = '1000')
{ {
$this->respond($message, $code); $this->respond($message, $code);
} }

@ -26,15 +26,10 @@ class CommonController extends BaseController {
{ {
$account = I('account'); $account = I('account');
$password = I('password'); $password = I('password');
$code = I('code', '');
$verifyCode = I('verify_code', ''); $verifyCode = I('verify_code', '');
if (!$code) { $promoteId = I('promote_id', 0);
$this->respondError('参数非法');
}
$applyService = new ApplyService(); if (!$promoteId) {
$result = $applyService->decodeApplyCode($code);
if (!$result) {
$this->respondError('参数非法'); $this->respondError('参数非法');
} }
@ -42,7 +37,6 @@ class CommonController extends BaseController {
if (!$verify->check($verifyCode)) { if (!$verify->check($verifyCode)) {
$this->respondError('验证码错误'); $this->respondError('验证码错误');
} }
$promoteId = $result['promote_id'];
$promote = M('promote', 'tab_')->where(['id' => $promoteId])->find(); $promote = M('promote', 'tab_')->where(['id' => $promoteId])->find();
$userApi = new MemberApi(); $userApi = new MemberApi();
@ -111,7 +105,7 @@ class CommonController extends BaseController {
$gameId = $params['game_id'] ?? 0; $gameId = $params['game_id'] ?? 0;
#验证短信验证码 #验证短信验证码
$this->smsVerify($params['account'], $params['code']); $this->smsVerify($params['account'], $params['verify_code']);
$res = $this->doRegister($params['account'], $params['password'], $params['account'], $promoteId, 4, 2, $gameId); $res = $this->doRegister($params['account'], $params['password'], $params['account'], $promoteId, 4, 2, $gameId);
if(empty($res)){ if(empty($res)){
@ -131,7 +125,7 @@ class CommonController extends BaseController {
if (empty($params)) { if (empty($params)) {
$this->respondError('基础信息不能为空'); $this->respondError('基础信息不能为空');
} }
$this->smsVerify($params['account'], $params['code']); $this->smsVerify($params['account'], $params['verify_code']);
//更新密码 //更新密码
$userApi = new MemberApi(); $userApi = new MemberApi();
$userInfo = M("user", "tab_")->where("account = '".$params['account']."'")->find(); $userInfo = M("user", "tab_")->where("account = '".$params['account']."'")->find();
@ -221,9 +215,9 @@ class CommonController extends BaseController {
$result = R('Common/Sms/send_sms_code', [$phone, 10, false]); $result = R('Common/Sms/send_sms_code', [$phone, 10, false]);
if ($result['code'] == 200) { if ($result['code'] == 200) {
$this->setData($result['data'])->respondSuccess(); $this->setData($result['data'])->respondSuccess('发送成功');
} else { } else {
$this->respondError(); $this->respondError('发送失败');
} }
} }

Loading…
Cancel
Save