Commit 6880bf0e authored by 刘丹's avatar 刘丹

测试

parent 49cd21f8
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
position: relative; position: relative;
z-index: 1; z-index: 1;
} }
body{
display: none;
}
.zhuce-img{ .zhuce-img{
width: 100%; width: 100%;
display: block; display: block;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Created by 刘丹 on 2017/12/26. * Created by 刘丹 on 2017/12/26.
*/ */
(function () { (function () {
$(document.body).show();
var url = location.search; //获取url中"?"符后的字串 var url = location.search; //获取url中"?"符后的字串
var theRequest = new Object(); var theRequest = new Object();
if (url.indexOf("?") != -1) { if (url.indexOf("?") != -1) {
...@@ -17,7 +17,9 @@ ...@@ -17,7 +17,9 @@
})(); })();
$("#phone").change(function(){
send();
});
var sends = { var sends = {
checked:1, checked:1,
send:function(){ send:function(){
...@@ -29,6 +31,10 @@ var sends = { ...@@ -29,6 +31,10 @@ var sends = {
return false; return false;
} }
} }
if("" == $("#phone").val()) {
alert("请输入您的手机号!");
return;
}
if (!is_mobile(val)) { if (!is_mobile(val)) {
alert("手机格式错误!") alert("手机格式错误!")
...@@ -45,8 +51,17 @@ var sends = { ...@@ -45,8 +51,17 @@ var sends = {
dataType: "json", dataType: "json",
beforeSend: function () {}, beforeSend: function () {},
success: function (response) { success: function (response) {
_token=response.data.token _token=response.data.token;
if(response.msg=="您已注册,请登录"){
alert("您已注册,请登录!");
clearInterval(timer);
$('.div-ranks a').addClass('send1').removeClass('send0').html("获取验证码");
location.reload();
}else{
$('.div-phone').append('<span class="error">'+response.msg+'</span>'); $('.div-phone').append('<span class="error">'+response.msg+'</span>');
}
}, },
error: function () { error: function () {
...@@ -63,7 +78,7 @@ var sends = { ...@@ -63,7 +78,7 @@ var sends = {
sends.checked = 1; sends.checked = 1;
return true; return true;
} }
$('.error').hide();
$('.div-ranks a').html("剩余"+time+"S"); $('.div-ranks a').html("剩余"+time+"S");
time--; time--;
sends.checked = 0; sends.checked = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment