master
ELF 5 years ago
parent 6621467b58
commit 18e39c5fc7

@ -381,7 +381,7 @@
<img src="__IMG__/20191225/yanzhengma.png" alt=""> <img src="__IMG__/20191225/yanzhengma.png" alt="">
<input name="verify_code" type="text" placeholder="请输入验证码"> <input name="verify_code" type="text" placeholder="请输入验证码">
</div> </div>
<img id="verifyCode" onclick="GetVerityCode()" 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>
@ -423,7 +423,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>
@ -462,11 +462,11 @@
</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>
<span><a href="{:U('News/protocol')}" style="color:#3CC2EF">《用户协议》</a></span> <span><a href="/mobile.php?s=News/protocol.html" style="color:#3CC2EF">《用户协议》</a></span>
</div> </div>
<div class="phoneCut"> <div class="phoneCut">
<img src="__IMG__/20191225/qiehuan.png" alt=""> <img src="__IMG__/20191225/qiehuan.png" alt="">
@ -496,11 +496,11 @@
<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>
<span><a href="{:U('News/protocol')}" style="color:#3CC2EF">《用户协议》</a></span> <span><a href="/mobile.php?s=News/protocol.html" style="color:#3CC2EF">《用户协议》</a></span>
</div> </div>
<div class="commonCut"> <div class="commonCut">
<img src="__IMG__/20191225/qiehuan.png" alt=""> <img src="__IMG__/20191225/qiehuan.png" alt="">
@ -683,12 +683,18 @@ var PhoneObj = {
window.location.href = 'mqqwpa://im/chat?chat_type=wpa&uin={$serviceQQ}&version=1&src_type=web&web_src=oicqzone.com'; 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()
@ -774,7 +780,7 @@ var PhoneObj = {
}) })
//普通注册 //普通注册
$("#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()
@ -822,7 +828,7 @@ var PhoneObj = {
}) })
//忘记密码 //忘记密码
$("#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()

@ -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();
@ -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