fix: make CMS content live and migrate to MySQL

This commit is contained in:
Codex User
2026-09-08 15:18:01 +08:00
parent 3a99ae30c5
commit 59c50c690f
31 changed files with 585 additions and 891 deletions
+3 -2
View File
@@ -1,10 +1,11 @@
import { useParams, Link } from 'react-router-dom'
import { METHODS as FALLBACK_METHODS } from '@/data/mock'
import { useCMS, getCMSMethods } from '@/services/cms'
import { useCMS, useCMSTexts, getCMSMethods } from '@/services/cms'
import GlobalCTA from '@/components/Layout/GlobalCTA'
export default function MethodDetail() {
const { data: METHODS } = useCMS(getCMSMethods, FALLBACK_METHODS)
const { data: texts } = useCMSTexts()
const { slug } = useParams()
const item = METHODS.find(m => m.slug === slug)
if (!item)
@@ -44,7 +45,7 @@ export default function MethodDetail() {
))}
</ol>
<div className="placeholder" style={{ marginTop: 12 }}>
{texts['methods.detail_note'] || '完整方法阐述、工具清单和交付物清单请在后台维护。'}
</div>
</div>
<div style={{ marginTop: 16, display: 'flex', gap: 10 }}>