no message

This commit is contained in:
hellcat 2025-12-31 13:52:36 +08:00
parent e50f41adf0
commit 8078d40c17

View File

@ -132,20 +132,28 @@ function time(o) {
}
}
$("#email_verify").click(function() {
// 定义邮箱后缀黑名单
var blacklistedDomains = ["@10minutemail.com","@10minemail.com","@sharklasers.com","@guerrillamail.com","@spam4.me","@mailinator.com","@mailinator.net","@yopmail.com","@yopmail.fr","@yopmail.net","@temp-mail.org","@mytemp.email","@disposable.com","@throwawaymail.com","@jourrapide.com","@armyspy.com","@rhyta.com","@getnada.com","@nada.email","@mohmal.com","@trashmail.com","@trashmail.me","@burnermail.io","@emailondeck.com","@minutemailbox.com","@mailsac.com","@maildrop.cc","@spamgourmet.com","@neverbox.com","@email.ml","@hele.win","@uxin.tech","@smail.pw","@vmail.dev","@idu.one","@mail.tm","@mail.gw","@mail.td","@linshiyou.com","@22.do","@smailpro.com","@emailnator.com","@gmail.inputekno.com","@linshiyouxiang.net","@tempmail.altmails.com","@tempmailbox.net","@spambox.xyz","@mailgolem.com","@mailpoof.com","@crazymailing.com","@edumail.icu","@etempmail.com","@linshi-email.com","@mail.xiuvi.cn","@ihotmails.com","@dreamhunter2333.xyz","@mail.cx","@awsl.uk","@linshiyouxiang.net"];
let ajaxPending = false;
// 检查邮箱后缀是否在黑名单中
// 获取输入的邮箱
var email = document.getElementById('email').value.trim();
// 提取邮箱后缀
var emailDomain = email.substring(email.indexOf('@'));
var isBlacklisted = blacklistedDomains.includes(emailDomain);
if (isBlacklisted) {
Swal.fire('操作失败', '该邮箱后缀被禁止注册', 'error');
return; // 阻止后续操作
}
$("#email_verify").click(function() {
if (ajaxPending) return;
ajaxPending = true;
let sTextOld = $(this).text();
$(this).text('正在发送...').prop('disabled', true);
// 定义邮箱后缀黑名单
var blacklistedDomains = ["@10minutemail.com","@10minemail.com","@sharklasers.com","@guerrillamail.com","@spam4.me","@mailinator.com","@mailinator.net","@yopmail.com","@yopmail.fr","@yopmail.net","@temp-mail.org","@mytemp.email","@disposable.com","@throwawaymail.com","@jourrapide.com","@armyspy.com","@rhyta.com","@getnada.com","@nada.email","@mohmal.com","@trashmail.com","@trashmail.me","@burnermail.io","@emailondeck.com","@minutemailbox.com","@mailsac.com","@maildrop.cc","@spamgourmet.com","@neverbox.com","@email.ml","@hele.win","@uxin.tech","@smail.pw","@vmail.dev","@idu.one","@mail.tm","@mail.gw","@mail.td","@linshiyou.com","@22.do","@smailpro.com","@emailnator.com","@gmail.inputekno.com","@linshiyouxiang.net","@tempmail.altmails.com","@tempmailbox.net","@spambox.xyz","@mailgolem.com","@mailpoof.com","@crazymailing.com","@edumail.icu","@etempmail.com","@linshi-email.com","@mail.xiuvi.cn","@ihotmails.com","@dreamhunter2333.xyz","@mail.cx","@awsl.uk","@linshiyouxiang.net"];
// 检查邮箱后缀是否在黑名单中
// 获取输入的邮箱
var email = document.getElementById('email').value.trim();
// 提取邮箱后缀
var emailDomain = email.substring(email.indexOf('@'));
var isBlacklisted = blacklistedDomains.includes(emailDomain);
if (isBlacklisted) {
Swal.fire('操作失败', '该邮箱后缀被禁止注册', 'error');
return; // 阻止后续操作
}
// 如果邮箱不在黑名单中,继续执行发送验证码请求
$.ajax({
@ -167,6 +175,10 @@ if (isBlacklisted) {
Swal.fire('发生错误', '点击确定后刷新重试', 'error').then(function() {
window.location.reload();
});
},
complete: function() {
$("#email_verify").text(sTextOld).prop('disabled', false);
ajaxPending = false;
}
})
})
@ -269,13 +281,21 @@ if (getCookie('code') != '') {
$('#invite_code').val(getCookie('code'));
}
//let ajaxPending = false;
// reset
$('#reset-button').click(function(e) {
if (notnull() == false) {
return;
}
$("#reset-button").text('正在发送').attr('disabled', true);
if (ajaxPending) return;
ajaxPending = true;
let sTextOld = $(this).text();
$(this).text('正在发送...').prop('disabled', true);
// $("#reset-button").text('正在发送').attr('disabled', true);
$.ajax({
type: "POST",
@ -291,13 +311,17 @@ $('#reset-button').click(function(e) {
});
} else {
Swal.fire(data.msg, '', 'error')
$("#reset-button").text('发送验证邮件').attr('disabled', false);
// $("#reset-button").text('发送验证邮件').attr('disabled', false);
}
},
error: (jqXHR) => {
Swal.fire('发生错误', '点击确定后重试', 'error').then(function() {
window.location.reload();
});
},
complete: function() {
$("#reset-button").text(sTextOld).prop('disabled', false);
ajaxPending = false;
}
})
});