feat: 将Markdown渲染改为HTML渲染
- CMS相关字段由Markdown改为WYSIWYG,前端做出对应更改 - AssetUrl重写:将CMS地址重写为本地API
This commit is contained in:
@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user