@@ -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',