Browse Source

添加定位

milestone-20251013-宣传夺宝奇兵
zhaoruhui 3 months ago
parent
commit
b3abd03f66
  1. 86
      dist-test/index.html
  2. 2
      dist-test/main.js
  3. 65
      index.html

86
dist-test/index.html

@ -336,7 +336,7 @@
<p class="text-gray-400 text-sm paragraph-text">您的股票体检专家!</p>
</div>
</div>
<div class="flex items-start">
<div class="w-10 h-10 rounded-full bg-primary/20 flex items-center justify-center mr-4 mt-1">
<img alt="AI预测大模型" src="https://hc.homilychart.com/hc/250121/img/AIyuce.png">
@ -346,7 +346,7 @@
<p class="text-gray-400 text-sm paragraph-text">时间空间价格AI精准预测!</p>
</div>
</div>
<div class="flex items-start">
<div class="w-10 h-10 rounded-full bg-primary/20 flex items-center justify-center mr-4 mt-1">
<img alt="夺宝利剑" src="https://hc.homilychart.com/hc/250121/img/duobaolijian.png">
@ -358,7 +358,7 @@
</div>
</div>
</div>
<!-- 右侧表单区域 - 保持不变 -->
<div class="bg-white p-8 md:p-12">
<form id="registrationForm" class="space-y-6">
@ -369,7 +369,7 @@
class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-primary focus:border-primary transition-all form-input"
placeholder="请输入您的姓名" required>
</div>
<div>
<label for="countryInfo" class="block text-sm font-medium text-gray-700 mb-1 form-label">国家/地区代码</label>
<select id="countryInfo" name="countryInfo"
@ -417,27 +417,28 @@
class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-primary focus:border-primary transition-all form-input"
autocomplete="off" required>
</div>
<div>
<label for="userWechat" class="block text-sm font-medium text-gray-700 mb-1 form-label">微信ID</label>
<input type="text" name="userWechat" id="userWechat" placeholder="微信ID ( 如没有WhatsApp )" autocomplete="off"
<input type="text" name="userWechat" id="userWechat" placeholder="微信ID ( 如没有WhatsApp )"
autocomplete="off"
class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-primary focus:border-primary transition-all form-input">
</div>
<div>
<label for="userEmail" class="block text-sm font-medium text-gray-700 mb-1 form-label">电子邮箱</label>
<input type="email" placeholder="请输入您的邮箱" name="userEmail" id="userEmail" autocomplete="off"
class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-primary focus:border-primary transition-all form-input"
required>
</div>
<div class="flex items-start">
<input type="checkbox" id="agreement" name="agreement" class="mt-1 mr-2" required>
<label for="agreement" class="text-sm text-gray-600 form-label">
我同意接收相关产品和服务的资讯
</label>
</div>
<button type="submit" id="submitBtn"
class="w-full py-3 px-6 rounded-lg gradient-background text-white font-medium hover:shadow-lg hover:shadow-primary/20 transition-all transform hover:-translate-y-0.5 form-button">
提交注册
@ -487,12 +488,12 @@
<div>
<h4 class="text-lg font-semibold mb-6 heading-tertiary">产品</h4>
<ul class="space-y-3">
<li class="list-item"><a href="https://api.whatsapp.com/send?phone=85255110485&text=我想了解赢在美股" target="_blank"
class="text-gray-400 hover:text-white transition-colors">弘历云版软件</a></li>
<li class="list-item"><a href="https://api.whatsapp.com/send?phone=85255110485&text=我想了解赢在美股" target="_blank"
class="text-gray-400 hover:text-white transition-colors">HomilyChart</a></li>
<li class="list-item"><a href="https://api.whatsapp.com/send?phone=85255110485&text=我想了解赢在美股" target="_blank"
class="text-gray-400 hover:text-white transition-colors">夺宝奇兵</a></li>
<li class="list-item"><a href="https://api.whatsapp.com/send?phone=85255110485&text=我想了解赢在美股"
target="_blank" class="text-gray-400 hover:text-white transition-colors">弘历云版软件</a></li>
<li class="list-item"><a href="https://api.whatsapp.com/send?phone=85255110485&text=我想了解赢在美股"
target="_blank" class="text-gray-400 hover:text-white transition-colors">HomilyChart</a></li>
<li class="list-item"><a href="https://api.whatsapp.com/send?phone=85255110485&text=我想了解赢在美股"
target="_blank" class="text-gray-400 hover:text-white transition-colors">夺宝奇兵</a></li>
<li class="list-item"><a href="https://api.whatsapp.com/send?phone=85255110485&text=我想了解赢在美股"
class="text-gray-400 hover:text-white transition-colors">博股会员</a></li>
<li class="list-item"><a href="https://api.whatsapp.com/send?phone=85255110485&text=我想了解赢在美股"
@ -503,12 +504,12 @@
<div>
<h4 class="text-lg font-semibold mb-6 heading-tertiary">公司</h4>
<ul class="space-y-3">
<li class="list-item"><a href="https://api.whatsapp.com/send?phone=85255110485&text=我想了解赢在美股" target="_blank"
class="text-gray-400 hover:text-white transition-colors">关于我们</a></li>
<li class="list-item"><a href="https://api.whatsapp.com/send?phone=85255110485&text=我想了解赢在美股" target="_blank"
class="text-gray-400 hover:text-white transition-colors">团队介绍</a></li>
<li class="list-item"><a href="https://api.whatsapp.com/send?phone=85255110485&text=我想了解赢在美股" target="_blank"
class="text-gray-400 hover:text-white transition-colors">联系我们</a></li>
<li class="list-item"><a href="https://api.whatsapp.com/send?phone=85255110485&text=我想了解赢在美股"
target="_blank" class="text-gray-400 hover:text-white transition-colors">关于我们</a></li>
<li class="list-item"><a href="https://api.whatsapp.com/send?phone=85255110485&text=我想了解赢在美股"
target="_blank" class="text-gray-400 hover:text-white transition-colors">团队介绍</a></li>
<li class="list-item"><a href="https://api.whatsapp.com/send?phone=85255110485&text=我想了解赢在美股"
target="_blank" class="text-gray-400 hover:text-white transition-colors">联系我们</a></li>
</ul>
</div>
@ -518,10 +519,11 @@
<li class="list-item">
<!-- <a href="hcdbqb-guide.html"
class="text-gray-400 hover:text-white transition-colors">帮助中心</a> -->
<a href="https://api.whatsapp.com/send?phone=85255110485&text=我想了解赢在美股" class="text-gray-400 hover:text-white transition-colors">帮助中心</a>
<a href="https://api.whatsapp.com/send?phone=85255110485&text=我想了解赢在美股"
class="text-gray-400 hover:text-white transition-colors">帮助中心</a>
</li>
<li class="list-item"><a href="https://api.whatsapp.com/send?phone=85255110485&text=我想了解赢在美股" target="_blank"
class="text-gray-400 hover:text-white transition-colors">常见问题</a></li>
<li class="list-item"><a href="https://api.whatsapp.com/send?phone=85255110485&text=我想了解赢在美股"
target="_blank" class="text-gray-400 hover:text-white transition-colors">常见问题</a></li>
</ul>
</div>
</div>
@ -868,27 +870,29 @@
border-radius: 50%;
animation: spin 1s linear infinite;
}
.gradient-background {
background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}
.bg-image-overlay {
background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)),
url('https://d31zlh4on95l9h.cloudfront.net/images/3b28e7abdfc4b495324cc3e6d9210b51.jpg');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}
.bg-image-overlay {
background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)),
url('https://d31zlh4on95l9h.cloudfront.net/images/3b28e7abdfc4b495324cc3e6d9210b51.jpg');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
.gradient-background {
background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}
.footer-bg {
background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
url('https://d31zlh4on95l9h.cloudfront.net/images/22576b3fe6f29e642f322d4d315ae426.jpg');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
url('https://d31zlh4on95l9h.cloudfront.net/images/22576b3fe6f29e642f322d4d315ae426.jpg');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
</style>
</body>

2
dist-test/main.js

@ -1 +1 @@
import{g as E,r as h}from"./member.js";const I=50,L=100,B=20,u=document.getElementById("registrationForm"),l=document.getElementById("successModal"),p=document.getElementById("closeModal"),a=document.getElementById("submitBtn"),g=document.getElementById("loadingOverlay"),i=document.getElementById("lectureImage");let r=!1;async function v(){console.log("开始加载讲座图片...");try{const e={id:1};console.log("调用getImageApi,参数:",e);const t=await E(e);console.log("接口返回:",t),t.code===200&&t.data?(i.src=t.data,console.log("讲座图片加载成功:",t.data)):(console.warn("获取图片失败:",t.msg),i.src="https://hc.homilychart.com/hc/250121/img/kecheng.jpg")}catch(e){console.error("加载讲座图片失败:",e),i.src="https://hc.homilychart.com/hc/250121/img/kecheng.jpg"}}function w(){g.style.display="flex",a.disabled=!0,a.textContent="提交中...",r=!0}function M(){g.style.display="none",a.disabled=!1,a.textContent="提交注册",r=!1}function s(e){alert(e)}function b(e){const{name:t,tel:o,email:n}=e;return!t||t.length>I?(s("请输入有效的姓名(最多50个字符)"),document.getElementById("userNameInfo").focus(),!1):!o||o.length>B?(s("请输入有效的电话号码"),document.getElementById("userMobile").focus(),!1):!n||n.length>L?(s("请输入电子邮箱"),document.getElementById("userEmail").focus(),!1):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)?!0:(s("请输入有效的电子邮箱地址"),document.getElementById("userEmail").focus(),!1)}async function A(e){if(e.preventDefault(),r)return;const t=document.getElementById("userNameInfo").value.trim(),o=document.getElementById("countryInfo").value,n=document.getElementById("userMobile").value.trim(),d=document.getElementById("userWechat").value.trim(),y=document.getElementById("userEmail").value.trim(),m={name:t,code:o,tel:n,wechat:d,email:y};if(b(m))try{w();const c=await h(m);c.code===200?(l.classList.remove("hidden"),u.reset()):s("注册失败: "+(c.msg||"未知错误"))}catch(c){console.error("请求失败:",c),s("网络错误,请稍后重试")}finally{M()}}function N(){document.getElementById("mobileMenu").classList.toggle("hidden");const t=document.getElementById("menuBtn").querySelector("i");t.classList.contains("fa-bars")?t.classList.replace("fa-bars","fa-times"):t.classList.replace("fa-times","fa-bars")}function H(){const e=document.querySelector("header");window.scrollY>50?(e.classList.add("py-2","shadow"),e.classList.remove("py-3")):(e.classList.add("py-3"),e.classList.remove("py-2","shadow"))}function f(){document.querySelectorAll(".animate-fade-in").forEach(t=>{const o=t.getBoundingClientRect().top,n=window.innerHeight;o<n-100&&(t.style.opacity="1",t.style.transform="translateY(0)")})}window.addEventListener("load",()=>{console.log("页面加载完成,开始调用loadLectureImage..."),v(),f(),document.getElementById("loadingOverlay").style.display="none"});u.addEventListener("submit",A);p.addEventListener("click",()=>{l.classList.add("hidden")});l.addEventListener("click",e=>{e.target===l&&l.classList.add("hidden")});document.getElementById("menuBtn").addEventListener("click",N);window.addEventListener("scroll",H);window.addEventListener("scroll",f);
import{g as E,r as h}from"./member.js";const I=50,L=100,B=20,u=document.getElementById("registrationForm"),l=document.getElementById("successModal"),p=document.getElementById("closeModal"),a=document.getElementById("submitBtn"),g=document.getElementById("loadingOverlay"),i=document.getElementById("lectureImage");let r=!1;async function v(){console.log("开始加载讲座图片...");try{const e={id:1};console.log("调用getImageApi,参数:",e);const t=await E(e);console.log("接口返回:",t),t.code===200&&t.data?(i.src=t.data,console.log("讲座图片加载成功:",t.data)):(console.warn("获取图片失败:",t.msg),i.src="https://hc.homilychart.com/hc/250121/img/kecheng.jpg")}catch(e){console.error("加载讲座图片失败:",e),i.src="https://hc.homilychart.com/hc/250121/img/kecheng.jpg"}}function w(){g.style.display="flex",a.disabled=!0,a.textContent="提交中...",r=!0}function b(){g.style.display="none",a.disabled=!1,a.textContent="提交注册",r=!1}function s(e){alert(e)}function M(e){const{name:t,tel:o,email:n}=e;return!t||t.length>I?(s("请输入有效的姓名(最多50个字符)"),document.getElementById("userNameInfo").focus(),!1):!o||o.length>B?(s("请输入有效的电话号码"),document.getElementById("userMobile").focus(),!1):!n||n.length>L?(s("请输入电子邮箱"),document.getElementById("userEmail").focus(),!1):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)?!0:(s("请输入有效的电子邮箱地址"),document.getElementById("userEmail").focus(),!1)}async function A(e){if(e.preventDefault(),r)return;const t=document.getElementById("userNameInfo").value.trim(),o=document.getElementById("countryInfo").value,n=document.getElementById("userMobile").value.trim(),d=document.getElementById("userWechat").value.trim(),y=document.getElementById("userEmail").value.trim(),m={name:t,code:o,tel:n,wechat:d,email:y};if(M(m))try{w();const c=await h(m);c.code===200?(l.classList.remove("hidden"),u.reset()):s("注册失败: "+(c.msg||"未知错误"))}catch(c){console.error("请求失败:",c),s("网络错误,请稍后重试")}finally{b()}}function N(){document.getElementById("mobileMenu").classList.toggle("hidden");const t=document.getElementById("menuBtn").querySelector("i");t.classList.contains("fa-bars")?t.classList.replace("fa-bars","fa-times"):t.classList.replace("fa-times","fa-bars")}function S(){const e=document.querySelector("header");window.scrollY>50?(e.classList.add("py-2","shadow"),e.classList.remove("py-3")):(e.classList.add("py-3"),e.classList.remove("py-2","shadow"))}function f(){document.querySelectorAll(".animate-fade-in").forEach(t=>{const o=t.getBoundingClientRect().top,n=window.innerHeight;o<n-100&&(t.style.opacity="1",t.style.transform="translateY(0)")})}function H(){const e=document.getElementById("register");e&&e.scrollIntoView({behavior:"smooth"})}window.addEventListener("load",()=>{console.log("页面加载完成,开始调用loadLectureImage..."),v(),f(),document.getElementById("loadingOverlay").style.display="none",H()});u.addEventListener("submit",A);p.addEventListener("click",()=>{l.classList.add("hidden")});l.addEventListener("click",e=>{e.target===l&&l.classList.add("hidden")});document.getElementById("menuBtn").addEventListener("click",N);window.addEventListener("scroll",S);window.addEventListener("scroll",f);

65
index.html

@ -36,6 +36,24 @@
}
}
</script>
<style>
/* 在head中添加初始滚动样式 */
html,
body {
scroll-behavior: auto;
}
/* 隐藏页面内容,直到滚动完成 */
body {
opacity: 0;
transition: opacity 0.3s ease;
}
body.content-visible {
opacity: 1;
}
</style>
</head>
<body class="font-sans bg-light text-dark body-text">
@ -582,6 +600,30 @@
let isSubmitting = false;
/**
* 立即滚动到注册表单(在页面加载前执行)
*/
function scrollToRegisterImmediately() {
// 禁用平滑滚动
document.documentElement.style.scrollBehavior = 'auto';
// 立即滚动到注册表单
const registerSection = document.getElementById('register');
if (registerSection) {
// 计算注册表单的位置(考虑固定导航栏的高度)
const headerHeight = document.querySelector('header').offsetHeight;
const registerPosition = registerSection.offsetTop - headerHeight - 20;
// 立即设置滚动位置
window.scrollTo(0, registerPosition);
}
// 恢复平滑滚动
setTimeout(() => {
document.documentElement.style.scrollBehavior = 'smooth';
}, 100);
}
/**
* 从后端获取讲座图片
*/
async function loadLectureImage() {
@ -774,15 +816,16 @@
});
}
/**
* 滚动到注册表单
*/
function scrollToRegisterForm() {
const registerSection = document.getElementById('register');
if (registerSection) {
registerSection.scrollIntoView({ behavior: 'smooth' });
}
}
// DOM加载完成后立即执行
document.addEventListener('DOMContentLoaded', function () {
// 立即滚动到注册表单
scrollToRegisterImmediately();
// 显示页面内容
setTimeout(() => {
document.body.classList.add('content-visible');
}, 50);
});
// 页面加载完成后执行
window.addEventListener('load', () => {
@ -791,9 +834,6 @@
executeScrollAnimation();
// 隐藏加载状态
document.getElementById('loadingOverlay').style.display = 'none';
// 新增:页面加载后自动滚动到注册表单
scrollToRegisterForm();
});
// 绑定表单提交事件
@ -825,7 +865,6 @@
/* 全局字体大小调整 - 整体调小 */
html {
font-size: 16px;
scroll-behavior: smooth;
}
/* 文本样式类 */

Loading…
Cancel
Save