移动端页脚电话支持一键拨号
This commit is contained in:
@@ -5,6 +5,8 @@ import { getCMSConfig, useCMS, useCMSTexts } from '@/services/cms'
|
||||
export default function Footer() {
|
||||
const { data: config } = useCMS(getCMSConfig, null)
|
||||
const { data: texts } = useCMSTexts()
|
||||
const hotline = String(config?.hotline || '').trim()
|
||||
const phoneLink = hotline.replace(/[^\d+]/g, '')
|
||||
return (
|
||||
<footer className="site-footer">
|
||||
<div className="container footer-grid">
|
||||
@@ -34,7 +36,11 @@ export default function Footer() {
|
||||
<Link to="/contact">咨询获取方案</Link>
|
||||
</li>
|
||||
</ul>
|
||||
{(config?.hotline || config?.contact_email) && <p className="footer-desc" style={{marginTop:16}}>{[config.hotline, config.contact_email].filter(Boolean).join(' · ')}</p>}
|
||||
{(hotline || config?.contact_email) && <p className="footer-desc" style={{marginTop:16}}>
|
||||
{hotline && <a className="footer-contact-link" href={`tel:${phoneLink}`} aria-label={`拨打电话 ${hotline}`}>{hotline}</a>}
|
||||
{hotline && config?.contact_email && ' · '}
|
||||
{config?.contact_email && <a className="footer-contact-link" href={`mailto:${config.contact_email}`}>{config.contact_email}</a>}
|
||||
</p>}
|
||||
</div>
|
||||
</div>
|
||||
<div className="container footer-bottom">
|
||||
|
||||
Reference in New Issue
Block a user