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

@ -3,5 +3,13 @@ import { companyProfileService } from '~~/server/services/cms/companyProfileServ
export default defineEventHandler(async (event) => {
const locale = getHeader(event, 'x-locale') || 'zh-CN';
return companyProfileService.getCompanyProfile(locale);
const companyProfile = await companyProfileService.getCompanyProfile(locale);
companyProfile.content = rewriteAssetUrls(
companyProfile.content,
useRuntimeConfig().public.directus.url,
'/api/assets'
);
return companyProfile;
});