Email Address
Verification Code
Send Code
Password
Sign Up
$(document).ready(function() { $("#sendCode").on("click", function() { axios.post('https://api.yilu.us/wp-json/yilu/send-code', { email: $("#email").val() }) .then(response => { if (response.data.code === 0) { alert('Verification code sent. Please check your email!'); } else { alert('Email already registered or format not valid.'); } }) .catch(error => console.error('Error sending code:', error)); }); $("#signupForm").on("submit", function(event) { event.preventDefault(); axios.post('https://api.yilu.us/wp-json/yilu/register-yilu', { email: $("#email").val(), password: $("#password").val(), v_code: $("#vcode").val() }).then(response => { if (response.data.code === 0) { window.location.href = "https://www.yilus5.com/signup-success.html"; } else { alert("Registration failed, please try again."); } }).catch(error => console.error('Error registering:', error)); }); });