页脚新增公司地址与高德导航

This commit is contained in:
Rei
2026-09-09 12:38:53 +08:00
parent ebb5568d79
commit 65cb9edcee
3 changed files with 17 additions and 2 deletions
+3 -1
View File
@@ -16,7 +16,7 @@ db.run(`INSERT OR IGNORE INTO admins (id, username, password_hash, created_at) V
db.get(`SELECT id FROM global_config WHERE id=1`, (err, row) => {
if (!row) {
db.run(`INSERT INTO global_config (id, site_title, slogan, seo_title, seo_desc, seo_keywords, hotline, contact_email, contact_address, cta_text, cta_link, updated_at) VALUES (1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
['阿美巴|AI时代企业进化平台', '帮助企业看清位置、找到方向、持续进化', '阿美巴|AI时代企业进化平台 · 企业进化陪跑', '以四大价值坐标与A/M/B状态坐标为观察系,帮助企业看清位置、找到方向、持续进化。', '阿美巴,企业进化,四大价值,A/M/B,AI时代企业进化平台', '400-XXX-XXXX', 'contact@aiameiba.com', '成都市', '咨询获取方案', '/contact', now]);
['阿美巴|AI时代企业进化平台', '帮助企业看清位置、找到方向、持续进化', '阿美巴|AI时代企业进化平台 · 企业进化陪跑', '以四大价值坐标与A/M/B状态坐标为观察系,帮助企业看清位置、找到方向、持续进化。', '阿美巴,企业进化,四大价值,A/M/B,AI时代企业进化平台', '400-XXX-XXXX', 'contact@aiameiba.com', '四川省成都市双流区正兴街道湖畔路北段366号1栋3楼1号', '咨询获取方案', '/contact', now]);
}
});
// 首页板块
@@ -117,6 +117,8 @@ const siteTexts = [
['footer.navigation_title', '页脚导航标题', '网站导航'],
['footer.action_title', '页脚行动入口标题', '行动入口'],
['footer.copyright', '页脚版权信息', '© 2026 成都阿美巴企业管理咨询有限公司 | aiameiba.com · ameiba.cn'],
['footer.address_title', '页脚地址标题', '公司地址'],
['footer.navigate_label', '页脚导航链接文案', '打开高德地图导航'],
['footer.qr_title', '页脚二维码区域标题', '关注我们'],
['footer.xcx_qr_label', '页脚微信小程序二维码标签', '微信小程序'],
['footer.fwh_qr_label', '页脚微信服务号二维码标签', '微信服务号'],
+9 -1
View File
@@ -7,14 +7,22 @@ export default function Footer() {
const { data: texts } = useCMSTexts()
const hotline = String(config?.hotline || '').trim()
const phoneLink = hotline.replace(/[^\d+]/g, '')
const companyName = texts['footer.company'] || '成都阿美巴企业管理咨询有限公司'
const address = String(config?.contact_address || '四川省成都市双流区正兴街道湖畔路北段366号1栋3楼1号').trim()
const amapLink = `https://uri.amap.com/search?keyword=${encodeURIComponent(`${companyName} ${address}`)}&city=${encodeURIComponent('成都')}&view=map&callnative=1&src=ameiba`
return (
<footer className="site-footer">
<div className="container footer-grid">
<div>
<div className="footer-brand">{texts['footer.company'] || '成都阿美巴企业管理咨询有限公司'}</div>
<div className="footer-brand">{companyName}</div>
<p className="footer-desc">
{texts['footer.description'] || config?.slogan || '帮助企业看清位置、找到方向、持续进化。'}
</p>
<a className="footer-address" href={amapLink} target="_blank" rel="noreferrer" aria-label={`在高德地图中查找并导航至${address}`}>
<span>{texts['footer.address_title'] || '公司地址'}</span>
<strong>{address}</strong>
<em>{texts['footer.navigate_label'] || '打开高德地图导航'} →</em>
</a>
</div>
<div>
<h4>{texts['footer.navigation_title'] || '网站导航'}</h4>
+5
View File
@@ -79,6 +79,11 @@
.footer-bottom a { color: #94a3b8; }
.footer-contact-link { color: #94a3b8; }
.footer-contact-link:hover { color: #fff; }
.footer-address { display: grid; gap: 3px; margin-top: 16px; color: #94a3b8; font-size: 13px; line-height: 1.6; }
.footer-address span { color: #cbd5e1; font-weight: 700; }
.footer-address strong { color: #94a3b8; font-weight: 400; }
.footer-address em { color: #cbd5e1; font-size: 12px; font-style: normal; margin-top: 2px; }
.footer-address:hover strong, .footer-address:hover em { color: #fff; }
.footer-qr-list { display: flex; gap: 12px; }
.footer-qr figure { margin: 0; text-align: center; }
.footer-qr img { width: 96px; height: 96px; object-fit: cover; background: #fff; border-radius: 6px; padding: 3px; }