|
|
@ -402,7 +402,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div> |
|
|
<div> |
|
|
<label for="countryInfo" class="block text-sm font-medium text-gray-700 mb-1 form-label">国家/地区代码 <span class="text-red-500">*</span></label> |
|
|
|
|
|
|
|
|
<label for="countryInfo" class="block text-sm font-medium text-gray-700 mb-1 form-label">国家/地区代码 <span class="text-red-500"></span></label> |
|
|
<select id="countryInfo" name="countryInfo" |
|
|
<select id="countryInfo" name="countryInfo" |
|
|
class="w-full px-4 py-3 rounded-lg border-2 border-gray-300 focus:border-orange-500 focus:ring-0 transition-all form-input" |
|
|
class="w-full px-4 py-3 rounded-lg border-2 border-gray-300 focus:border-orange-500 focus:ring-0 transition-all form-input" |
|
|
required> |
|
|
required> |
|
|
@ -468,17 +468,17 @@ |
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">请选择您希望优先获取的权益 (可多选) <span class="text-red-500">*</span></label> |
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">请选择您希望优先获取的权益 (可多选) <span class="text-red-500">*</span></label> |
|
|
<div class="space-y-3"> |
|
|
<div class="space-y-3"> |
|
|
<label class="flex items-center space-x-3 cursor-pointer group"> |
|
|
<label class="flex items-center space-x-3 cursor-pointer group"> |
|
|
<input type="checkbox" name="benefits[]" value="DeepChart" |
|
|
|
|
|
|
|
|
<input type="checkbox" name="benefits[]" value="1" |
|
|
class="w-5 h-5 border-2 border-gray-300 rounded focus:border-orange-500 focus:ring-0 custom-orange-checkbox"> |
|
|
class="w-5 h-5 border-2 border-gray-300 rounded focus:border-orange-500 focus:ring-0 custom-orange-checkbox"> |
|
|
<span class="text-sm text-gray-600 group-hover:text-gray-800">获取DeepChart体验权限</span> |
|
|
<span class="text-sm text-gray-600 group-hover:text-gray-800">获取DeepChart体验权限</span> |
|
|
</label> |
|
|
</label> |
|
|
<label class="flex items-center space-x-3 cursor-pointer group"> |
|
|
<label class="flex items-center space-x-3 cursor-pointer group"> |
|
|
<input type="checkbox" name="benefits[]" value="夺宝奇兵" |
|
|
|
|
|
|
|
|
<input type="checkbox" name="benefits[]" value="2" |
|
|
class="w-5 h-5 border-2 border-gray-300 rounded focus:border-orange-500 focus:ring-0 custom-orange-checkbox"> |
|
|
class="w-5 h-5 border-2 border-gray-300 rounded focus:border-orange-500 focus:ring-0 custom-orange-checkbox"> |
|
|
<span class="text-sm text-gray-600 group-hover:text-gray-800">获取"夺宝奇兵"体验权限</span> |
|
|
<span class="text-sm text-gray-600 group-hover:text-gray-800">获取"夺宝奇兵"体验权限</span> |
|
|
</label> |
|
|
</label> |
|
|
<label class="flex items-center space-x-3 cursor-pointer group"> |
|
|
<label class="flex items-center space-x-3 cursor-pointer group"> |
|
|
<input type="checkbox" name="benefits[]" value="独家课程" |
|
|
|
|
|
|
|
|
<input type="checkbox" name="benefits[]" value="3" |
|
|
class="w-5 h-5 border-2 border-gray-300 rounded focus:border-orange-500 focus:ring-0 custom-orange-checkbox"> |
|
|
class="w-5 h-5 border-2 border-gray-300 rounded focus:border-orange-500 focus:ring-0 custom-orange-checkbox"> |
|
|
<span class="text-sm text-gray-600 group-hover:text-gray-800">参加"赢在美股"独家课程 - 学习前沿分析方法与操作策略</span> |
|
|
<span class="text-sm text-gray-600 group-hover:text-gray-800">参加"赢在美股"独家课程 - 学习前沿分析方法与操作策略</span> |
|
|
</label> |
|
|
</label> |
|
|
@ -549,7 +549,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
</section> |
|
|
</section> |
|
|
</section> |
|
|
</section> |
|
|
<section id="page-register" class="page dohidden"> |
|
|
|
|
|
|
|
|
<section id="page-register" class="page"> |
|
|
<!-- DeepChart2月份免费体验页面 --> |
|
|
<!-- DeepChart2月份免费体验页面 --> |
|
|
<div class="pt-32 pb-20"> |
|
|
<div class="pt-32 pb-20"> |
|
|
<div class="container mx-auto max-w-6xl"> |
|
|
<div class="container mx-auto max-w-6xl"> |
|
|
@ -571,12 +571,13 @@ |
|
|
<div class="lg:w-2/3"> |
|
|
<div class="lg:w-2/3"> |
|
|
<div class="bg-white rounded-3xl shadow-xl overflow-hidden"> |
|
|
<div class="bg-white rounded-3xl shadow-xl overflow-hidden"> |
|
|
<div class="p-8 md:p-12"> |
|
|
<div class="p-8 md:p-12"> |
|
|
<form class="space-y-6"> |
|
|
|
|
|
|
|
|
<form class="space-y-6" id="registrationForm1"> |
|
|
<!-- 姓名 --> |
|
|
<!-- 姓名 --> |
|
|
<div> |
|
|
<div> |
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">姓名 <span class="text-red-500">*</span></label> |
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">姓名 <span class="text-red-500">*</span></label> |
|
|
<input type="text" |
|
|
<input type="text" |
|
|
class="w-full px-4 py-3 rounded-lg border-2 border-gray-300 focus:border-orange-500 focus:ring-0 transition-all form-input" |
|
|
class="w-full px-4 py-3 rounded-lg border-2 border-gray-300 focus:border-orange-500 focus:ring-0 transition-all form-input" |
|
|
|
|
|
id="userNameInfo1" |
|
|
placeholder="请输入您的姓名" required> |
|
|
placeholder="请输入您的姓名" required> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
@ -584,12 +585,45 @@ |
|
|
<div> |
|
|
<div> |
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">手机号码 <span class="text-red-500">*</span></label> |
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">手机号码 <span class="text-red-500">*</span></label> |
|
|
<div class="flex gap-3 flex-col md:flex-row"> |
|
|
<div class="flex gap-3 flex-col md:flex-row"> |
|
|
<select class="w-full md:w-1/3 px-3 py-3 rounded-lg border-2 border-gray-300 focus:border-orange-500 focus:ring-0 transition-all"> |
|
|
|
|
|
|
|
|
<select class="w-full md:w-1/3 px-3 py-3 rounded-lg border-2 border-gray-300 focus:border-orange-500 focus:ring-0 transition-all" |
|
|
|
|
|
id="countryInfo1" |
|
|
|
|
|
> |
|
|
|
|
|
<option value="+65">+65 新加坡</option> |
|
|
|
|
|
<option value="+60">+60 马来西亚</option> |
|
|
|
|
|
<option value="+852">+852 香港</option> |
|
|
<option value="+1" selected>+1 美国</option> |
|
|
<option value="+1" selected>+1 美国</option> |
|
|
|
|
|
<option value="+62">+62 印尼</option> |
|
|
|
|
|
<option value="+1">+1 加拿大</option> |
|
|
|
|
|
<option value="+61">+61 澳大利亚</option> |
|
|
|
|
|
<option value="+673">+673 文莱</option> |
|
|
|
|
|
<option value="+886">+886 台湾</option> |
|
|
<option value="+86">+86 中国</option> |
|
|
<option value="+86">+86 中国</option> |
|
|
<option value="+852">+852 香港</option> |
|
|
|
|
|
|
|
|
<option value="+0">+0 其他</option> |
|
|
|
|
|
<option value="+64">+64 新西兰</option> |
|
|
|
|
|
<option value="+44">+44 英国</option> |
|
|
|
|
|
<option value="+81">+81 日本</option> |
|
|
|
|
|
<option value="+49">+49 德国</option> |
|
|
|
|
|
<option value="+82">+82 韩国</option> |
|
|
|
|
|
<option value="+84">+84 越南</option> |
|
|
|
|
|
<option value="+971">+971 阿联酋</option> |
|
|
|
|
|
<option value="+45">+45 丹麦</option> |
|
|
|
|
|
<option value="+853">+853 澳门</option> |
|
|
|
|
|
<option value="+66">+66 泰国</option> |
|
|
|
|
|
<option value="+91">+91 印度</option> |
|
|
|
|
|
<option value="+41">+41 瑞士</option> |
|
|
|
|
|
<option value="+358">+358 芬兰</option> |
|
|
|
|
|
<option value="+33">+33 法国</option> |
|
|
|
|
|
<option value="+63">+63 菲律宾</option> |
|
|
|
|
|
<option value="+31">+31 荷兰</option> |
|
|
|
|
|
<option value="+46">+46 瑞典</option> |
|
|
|
|
|
<option value="+34">+34 西班牙</option> |
|
|
|
|
|
<option value="+54">+54 阿根廷</option> |
|
|
|
|
|
<option value="+39">+39 意大利</option> |
|
|
|
|
|
<option value="+7">+7 俄罗斯</option> |
|
|
|
|
|
<option value="+420">+420 捷克</option> |
|
|
</select> |
|
|
</select> |
|
|
<input type="tel" |
|
|
<input type="tel" |
|
|
|
|
|
id="userMobile1" |
|
|
class="w-full md:flex-1 px-4 py-3 rounded-lg border-2 border-gray-300 focus:border-orange-500 focus:ring-0 transition-all" |
|
|
class="w-full md:flex-1 px-4 py-3 rounded-lg border-2 border-gray-300 focus:border-orange-500 focus:ring-0 transition-all" |
|
|
placeholder="不带国家编号的纯机号" required> |
|
|
placeholder="不带国家编号的纯机号" required> |
|
|
</div> |
|
|
</div> |
|
|
@ -599,6 +633,7 @@ |
|
|
<div> |
|
|
<div> |
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">微信ID</label> |
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">微信ID</label> |
|
|
<input type="text" |
|
|
<input type="text" |
|
|
|
|
|
id="userWechat1" |
|
|
class="w-full px-4 py-3 rounded-lg border-2 border-gray-300 focus:border-orange-500 focus:ring-0 transition-all" |
|
|
class="w-full px-4 py-3 rounded-lg border-2 border-gray-300 focus:border-orange-500 focus:ring-0 transition-all" |
|
|
placeholder="微信ID(如没有WhatsApp)"> |
|
|
placeholder="微信ID(如没有WhatsApp)"> |
|
|
</div> |
|
|
</div> |
|
|
@ -607,11 +642,13 @@ |
|
|
<div> |
|
|
<div> |
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">邮箱地址 <span class="text-red-500">*</span></label> |
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">邮箱地址 <span class="text-red-500">*</span></label> |
|
|
<input type="email" |
|
|
<input type="email" |
|
|
|
|
|
id="userEmail1" |
|
|
class="w-full px-4 py-3 rounded-lg border-2 border-gray-300 focus:border-orange-500 focus:ring-0 transition-all" |
|
|
class="w-full px-4 py-3 rounded-lg border-2 border-gray-300 focus:border-orange-500 focus:ring-0 transition-all" |
|
|
placeholder="请输入您的邮箱地址" required> |
|
|
placeholder="请输入您的邮箱地址" required> |
|
|
</div> |
|
|
</div> |
|
|
<!-- 提交按钮 --> |
|
|
<!-- 提交按钮 --> |
|
|
<button type="submit" |
|
|
<button type="submit" |
|
|
|
|
|
id="submitBtn1" |
|
|
class="w-full py-4 px-6 rounded-lg text-white font-bold text-lg hover:shadow-lg transition-all transform hover:-translate-y-0.5 mt-8 custom-orange-button"> |
|
|
class="w-full py-4 px-6 rounded-lg text-white font-bold text-lg hover:shadow-lg transition-all transform hover:-translate-y-0.5 mt-8 custom-orange-button"> |
|
|
提交注册 |
|
|
提交注册 |
|
|
</button> |
|
|
</button> |
|
|
@ -683,7 +720,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</section> |
|
|
</section> |
|
|
<section id="page-register-success" class="page"> |
|
|
|
|
|
|
|
|
<section id="page-register-success" class="page dohidden"> |
|
|
|
|
|
|
|
|
</section> |
|
|
</section> |
|
|
<section id="page-guide" class="page dohidden"> |
|
|
<section id="page-guide" class="page dohidden"> |
|
|
@ -876,6 +913,7 @@ |
|
|
|
|
|
|
|
|
// 表单提交处理 |
|
|
// 表单提交处理 |
|
|
const registrationForm = document.getElementById('registrationForm'); |
|
|
const registrationForm = document.getElementById('registrationForm'); |
|
|
|
|
|
const registrationForm1 = document.getElementById('registrationForm1'); |
|
|
const successModal = document.getElementById('successModal'); |
|
|
const successModal = document.getElementById('successModal'); |
|
|
const closeModal = document.getElementById('closeModal'); |
|
|
const closeModal = document.getElementById('closeModal'); |
|
|
const submitBtn = document.getElementById('submitBtn'); |
|
|
const submitBtn = document.getElementById('submitBtn'); |
|
|
@ -1009,9 +1047,61 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 处理表单提交事件 |
|
|
|
|
|
|
|
|
* 处理DC表单提交事件 |
|
|
* @param {Event} submitEvent - 表单提交事件 |
|
|
* @param {Event} submitEvent - 表单提交事件 |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
async function handleDCFormSubmit(submitEvent) { |
|
|
|
|
|
submitEvent.preventDefault(); |
|
|
|
|
|
|
|
|
|
|
|
// 防止重复提交 |
|
|
|
|
|
if (isSubmitting) { |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 表单数据验证 |
|
|
|
|
|
const userNameInfo = document.getElementById("userNameInfo1").value.trim(); |
|
|
|
|
|
const countryInfo = document.getElementById("countryInfo1").value; |
|
|
|
|
|
const userMobile = document.getElementById("userMobile1").value.trim(); |
|
|
|
|
|
const userWechat = document.getElementById("userWechat1").value.trim(); |
|
|
|
|
|
const userEmail = document.getElementById("userEmail1").value.trim(); |
|
|
|
|
|
const sourceType = await getSourceTypeFromUrl(); |
|
|
|
|
|
const url = await getFromUrl(); |
|
|
|
|
|
const formData = { |
|
|
|
|
|
name: userNameInfo, |
|
|
|
|
|
code: countryInfo, |
|
|
|
|
|
tel: userMobile, |
|
|
|
|
|
wechat: userWechat, |
|
|
|
|
|
email: userEmail, |
|
|
|
|
|
type: sourceType, |
|
|
|
|
|
url: url, |
|
|
|
|
|
source: 1, |
|
|
|
|
|
}; |
|
|
|
|
|
console.log('formData:', formData); // 调试信息 |
|
|
|
|
|
|
|
|
|
|
|
if (!validateFormData(formData)) { |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
showLoadingIndicator(); |
|
|
|
|
|
|
|
|
|
|
|
// 调用注册API |
|
|
|
|
|
const response = await registerMemberApi(formData); |
|
|
|
|
|
|
|
|
|
|
|
if (response.code === 200) { |
|
|
|
|
|
successModal.classList.remove('hidden'); |
|
|
|
|
|
registrationForm1.reset(); |
|
|
|
|
|
} else { |
|
|
|
|
|
showErrorMessage('注册失败: ' + (response.msg || '未知错误')); |
|
|
|
|
|
} |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
console.error('请求失败:', error); |
|
|
|
|
|
showErrorMessage('网络错误,请稍后重试'); |
|
|
|
|
|
} finally { |
|
|
|
|
|
hideLoadingIndicator(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
async function handleFormSubmit(submitEvent) { |
|
|
async function handleFormSubmit(submitEvent) { |
|
|
submitEvent.preventDefault(); |
|
|
submitEvent.preventDefault(); |
|
|
|
|
|
|
|
|
@ -1028,7 +1118,11 @@ |
|
|
const userEmail = document.getElementById("userEmail").value.trim(); |
|
|
const userEmail = document.getElementById("userEmail").value.trim(); |
|
|
const sourceType = await getSourceTypeFromUrl(); |
|
|
const sourceType = await getSourceTypeFromUrl(); |
|
|
const url = await getFromUrl(); |
|
|
const url = await getFromUrl(); |
|
|
|
|
|
|
|
|
|
|
|
const benefits = Array.from( |
|
|
|
|
|
document.querySelectorAll('input[name="benefits[]"]:checked') |
|
|
|
|
|
).map(item => item.value); |
|
|
|
|
|
const benefitsParam = benefits.join(','); |
|
|
|
|
|
console.log(benefitsParam) |
|
|
const formData = { |
|
|
const formData = { |
|
|
name: userNameInfo, |
|
|
name: userNameInfo, |
|
|
code: countryInfo, |
|
|
code: countryInfo, |
|
|
@ -1037,6 +1131,8 @@ |
|
|
email: userEmail, |
|
|
email: userEmail, |
|
|
type: sourceType, |
|
|
type: sourceType, |
|
|
url: url, |
|
|
url: url, |
|
|
|
|
|
source: 0, |
|
|
|
|
|
benefit_intention: benefitsParam |
|
|
}; |
|
|
}; |
|
|
console.log('formData:', formData); // 调试信息 |
|
|
console.log('formData:', formData); // 调试信息 |
|
|
|
|
|
|
|
|
@ -1063,7 +1159,6 @@ |
|
|
hideLoadingIndicator(); |
|
|
hideLoadingIndicator(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 切换移动端菜单显示状态 |
|
|
* 切换移动端菜单显示状态 |
|
|
*/ |
|
|
*/ |
|
|
@ -1131,6 +1226,7 @@ |
|
|
|
|
|
|
|
|
// 绑定表单提交事件 |
|
|
// 绑定表单提交事件 |
|
|
registrationForm.addEventListener('submit', handleFormSubmit); |
|
|
registrationForm.addEventListener('submit', handleFormSubmit); |
|
|
|
|
|
registrationForm1.addEventListener('submit', handleDCFormSubmit); |
|
|
|
|
|
|
|
|
// 关闭模态框事件 |
|
|
// 关闭模态框事件 |
|
|
closeModal.addEventListener('click', () => { |
|
|
closeModal.addEventListener('click', () => { |
|
|
|