feat: 更新产品类型和内容,优化产品展示功能
- 重构产品类型定义,新增desc、models、content字段 - 更新所有语言的产品内容,包括详细规格和化学/机械性能 - 修改产品展示组件,支持MDX内容渲染和模型列表展示 - 调整产品详情页布局,优化信息展示方式 - 更新i18n翻译文件,同步产品名称变更 - 修改默认主题配置为light模式 - 修复公司简介中的格式问题
This commit is contained in:
@@ -29,7 +29,7 @@ export async function getProducts(locale: string = DEFAULT_LOCALE): Promise<{ pr
|
||||
const fileContents = await fs.promises.readFile(fullPath, 'utf8');
|
||||
|
||||
const { data, content } = matter(fileContents);
|
||||
console.log(data);
|
||||
// console.log(data);
|
||||
|
||||
return {
|
||||
locale, // use locale parameter
|
||||
@@ -38,7 +38,8 @@ export async function getProducts(locale: string = DEFAULT_LOCALE): Promise<{ pr
|
||||
place: data.place,
|
||||
publishedTime: data.publishedTime,
|
||||
images: data.images || [],
|
||||
detail: data.detail,
|
||||
models: data.models || [],
|
||||
desc: data.desc || '',
|
||||
spec: data.spec || [],
|
||||
packaging: data.packaging || '',
|
||||
slug: data.slug || '',
|
||||
|
||||
Reference in New Issue
Block a user