feat: 新增愈心解码整合页面 + 公共代码重构
- 新增 common.js: 从 shuzi.html/yangsheng.html 提取共享引擎(数字三角计算、八字五行、体质判别等纯函数+数据字典) - 新增 jiema.html: 愈心解码统一入口,整合数字性格+五行体质+今日锦囊,含付费墙(模拟支付)、分享卡片、契合度测算 - shuzi.html: 引用 common.js,删重复代码,新增返回链接+URL参数预填 - yangsheng.html: 引用 common.js,删重复代码,新增返回链接+URL参数预填 - yuxingu.html: Hero下方新增愈心解码入口卡片(含生日输入+生成按钮) - index.html: 新增愈心解码导航卡片 - CLAUDE.md: 补充项目文档和架构说明 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -161,6 +161,38 @@ body{
|
||||
<div class="hearts-css"><span class="hh"></span><span class="hh"></span></div>
|
||||
</div>
|
||||
|
||||
<!-- 愈心解码入口 -->
|
||||
<div class="section">
|
||||
<div style="background:#fff;border-radius:18px;padding:22px 18px;box-shadow:0 4px 16px rgba(0,0,0,0.06);text-align:center;">
|
||||
<div style="font-size:18px;font-weight:700;color:#C8923A;margin-bottom:4px;">🔮 愈心解码</div>
|
||||
<div style="font-size:12px;color:var(--sub);margin-bottom:16px;">输入生日,解锁你的身心密码</div>
|
||||
<div style="display:flex;gap:6px;align-items:center;justify-content:center;flex-wrap:wrap;">
|
||||
<input type="number" id="dy" placeholder="1990" maxlength="4" style="width:62px;padding:10px 6px;border:1.5px solid #e8e0d8;border-radius:10px;font-size:15px;text-align:center;outline:none;background:#fdfaf7;">
|
||||
<span style="font-size:13px;color:var(--sub);">年</span>
|
||||
<input type="number" id="dm" placeholder="1" maxlength="2" style="width:48px;padding:10px 6px;border:1.5px solid #e8e0d8;border-radius:10px;font-size:15px;text-align:center;outline:none;background:#fdfaf7;">
|
||||
<span style="font-size:13px;color:var(--sub);">月</span>
|
||||
<input type="number" id="dd" placeholder="1" maxlength="2" style="width:48px;padding:10px 6px;border:1.5px solid #e8e0d8;border-radius:10px;font-size:15px;text-align:center;outline:none;background:#fdfaf7;">
|
||||
<span style="font-size:13px;color:var(--sub);">日</span>
|
||||
<button onclick="goDecode()" style="padding:10px 18px;background:var(--pri);color:#fff;border:none;border-radius:22px;font-size:14px;font-weight:600;cursor:pointer;box-shadow:0 3px 10px rgba(229,77,66,.3);">生成 →</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function goDecode(){
|
||||
var y=document.getElementById('dy').value.trim();
|
||||
var m=document.getElementById('dm').value.trim();
|
||||
var d=document.getElementById('dd').value.trim();
|
||||
if(!y||!m||!d){alert('请输入完整的出生年月日');return;}
|
||||
location.href='jiema.html?y='+encodeURIComponent(y)+'&m='+encodeURIComponent(m)+'&d='+encodeURIComponent(d);
|
||||
}
|
||||
['dy','dm','dd'].forEach(function(id){
|
||||
document.getElementById(id).addEventListener('keydown',function(e){
|
||||
if(e.key==='Enter')goDecode();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- 疗愈魔方 -->
|
||||
<div class="section">
|
||||
<div class="sec-head" style="justify-content:center;flex-direction:column;align-items:center;gap:4px">
|
||||
|
||||
Reference in New Issue
Block a user