feat: 将Markdown渲染改为HTML渲染

- CMS相关字段由Markdown改为WYSIWYG,前端做出对应更改
- AssetUrl重写:将CMS地址重写为本地API
This commit is contained in:
2025-11-14 11:06:00 +08:00
parent 644dfa329c
commit 54d0e297ea
14 changed files with 143 additions and 18 deletions

View File

@ -10,5 +10,13 @@ export default defineEventHandler(async (event) => {
const locale = getHeader(event, 'x-locale') || 'zh-CN';
return solutionService.getSolutionById(id, locale);
const solution = await solutionService.getSolutionById(id, locale);
solution.content = rewriteAssetUrls(
solution.content,
useRuntimeConfig().public.directus.url,
'/api/assets'
);
return solution;
});