...
|
...
|
@@ -39,17 +39,13 @@ |
|
|
<script>
|
|
|
$(function () {
|
|
|
//获取短信验证码
|
|
|
var times = 1;
|
|
|
var validCode = true;
|
|
|
$(".get_code").click(function () {
|
|
|
if (validCode) {
|
|
|
var user_phone = $(".login_phone").val();
|
|
|
console.log(user_phone);
|
|
|
if (!user_phone) {
|
|
|
layer.msg("手机号码格式不正确")
|
|
|
} else {
|
|
|
if (times == 1) {
|
|
|
times++;
|
|
|
$.ajax({
|
|
|
type: "post",
|
|
|
url: "{:url('portal/tool/get_sms_code')}",
|
...
|
...
|
@@ -64,14 +60,14 @@ |
|
|
validCode = false;
|
|
|
code.addClass("msgs1");
|
|
|
var t = setInterval(function () {
|
|
|
if (time >= 0) {
|
|
|
if (time > 0) {
|
|
|
time--;
|
|
|
code.html(time + "秒");
|
|
|
validCode = false;
|
|
|
} else {
|
|
|
validCode = true;
|
|
|
code.html("重新获取");
|
|
|
clearInterval(t);
|
|
|
validCode = true;
|
|
|
}
|
|
|
}, 1000)
|
|
|
}
|
...
|
...
|
@@ -79,7 +75,6 @@ |
|
|
})
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$('.btn_login').click(function () {
|
...
|
...
|
|