|
@@ -221,10 +221,18 @@
|
|
})
|
|
})
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ let countdown = 60;
|
|
|
|
+ let countdownTimer;
|
|
|
|
+
|
|
//继续(注册)
|
|
//继续(注册)
|
|
$("#continueButton").on(tap, function (event) {
|
|
$("#continueButton").on(tap, function (event) {
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
console.log(2)
|
|
console.log(2)
|
|
|
|
+
|
|
|
|
+ if (countdownTimer) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
const emailEle = $("#email");
|
|
const emailEle = $("#email");
|
|
//输入框不存在
|
|
//输入框不存在
|
|
if (!emailEle) {
|
|
if (!emailEle) {
|
|
@@ -237,6 +245,11 @@
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // 点击后立即执行一次倒计时
|
|
|
|
+ countdown = 60
|
|
|
|
+ $(this).text(countdown + 's');
|
|
|
|
+ countdown--;
|
|
|
|
+
|
|
const dp = {
|
|
const dp = {
|
|
form: {
|
|
form: {
|
|
mobile: email,
|
|
mobile: email,
|
|
@@ -246,6 +259,19 @@
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ // 开始倒计时
|
|
|
|
+ countdownTimer = setInterval(() => {
|
|
|
|
+ if (countdown <= 0) {
|
|
|
|
+ clearInterval(countdownTimer);
|
|
|
|
+ countdownTimer = null;
|
|
|
|
+ // 倒计时结束后恢复按钮状态
|
|
|
|
+ $(this).text('Get code');
|
|
|
|
+ } else {
|
|
|
|
+ $(this).text(countdown + 's');
|
|
|
|
+ countdown--;
|
|
|
|
+ }
|
|
|
|
+ }, 1000);
|
|
|
|
+
|
|
$.ajax({
|
|
$.ajax({
|
|
url: "/index/captcha/sendEmailCaptcha",
|
|
url: "/index/captcha/sendEmailCaptcha",
|
|
headers: {platform: 'H5'},
|
|
headers: {platform: 'H5'},
|
|
@@ -258,7 +284,7 @@
|
|
//return false;
|
|
//return false;
|
|
//注册成功后进入
|
|
//注册成功后进入
|
|
if (obj.status === 200 || obj.status === '200') {
|
|
if (obj.status === 200 || obj.status === '200') {
|
|
- showToast('Code has been sent!Please check your new mails.')
|
|
|
|
|
|
+ showToast('Code has been sent! Please check your new mails.')
|
|
const parentElement = $(this).parent();
|
|
const parentElement = $(this).parent();
|
|
//parentElement.hide(0)
|
|
//parentElement.hide(0)
|
|
//parentElement.siblings().hide(0)
|
|
//parentElement.siblings().hide(0)
|
|
@@ -380,4 +406,4 @@
|
|
})
|
|
})
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-</html>
|
|
|
|
|
|
+</html>
|