feat: 添加产品总能量字段及更新环境配置
This commit is contained in:
1 parent
90fc98fa6a
commit
16365ceb29
3 files changed
+8
-1
No files matched your search
+3
-1
@@ -1 +1,3 @@
|
||||
VITE_ENABLE_MOCK=true
|
||||
VITE_ENABLE_MOCK=false
|
||||
VITE_API_PREFIX=/api
|
||||
VITE_PROXY_ENDPOINT=http://localhost:3000
|
||||
@@ -13,6 +13,7 @@ export interface Product extends BaseModel{
|
||||
fiber: number;
|
||||
ash: number;
|
||||
moisture: number;
|
||||
totalCalories: number; // 产品总能量(kcal),由后端基于ME算法计算
|
||||
}
|
||||
|
||||
export interface CreateProductRequest extends Pick<Product, "name" | 'photo' | 'tags' | 'totalWeight' | 'category' | 'protein' | 'fat' | 'fiber' | 'ash' | 'moisture'> {}
|
||||
|
||||
@@ -34,6 +34,10 @@ const columns: BaseTableColumns = [
|
||||
title: '净重',
|
||||
colKey: 'totalWeight',
|
||||
},
|
||||
{
|
||||
title: '总能量',
|
||||
colKey: 'totalCalories',
|
||||
},
|
||||
{
|
||||
title: '蛋白质',
|
||||
colKey: 'protein',
|
||||
|
||||
Reference in new issue
Block a user