From 4459e5acf3693e38eb48b4eba2983d31afd1c5cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AF=92=E5=AF=92?= <2596194220@qq.com> Date: Sun, 10 May 2026 20:25:48 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D=E6=9C=80=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E9=A3=9F=E8=B0=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/UniappTool.xml | 6 +----- app/api/recipe/route.ts | 6 +++--- app/page.tsx | 4 ++-- public/file.svg | 1 - public/globe.svg | 1 - public/next.svg | 1 - public/vercel.svg | 1 - public/window.svg | 1 - 8 files changed, 6 insertions(+), 15 deletions(-) delete mode 100644 public/file.svg delete mode 100644 public/globe.svg delete mode 100644 public/next.svg delete mode 100644 public/vercel.svg delete mode 100644 public/window.svg diff --git a/.idea/UniappTool.xml b/.idea/UniappTool.xml index f7328e8..0980911 100644 --- a/.idea/UniappTool.xml +++ b/.idea/UniappTool.xml @@ -1,10 +1,6 @@ - \ No newline at end of file diff --git a/app/api/recipe/route.ts b/app/api/recipe/route.ts index 0ed5c67..f74c6bf 100644 --- a/app/api/recipe/route.ts +++ b/app/api/recipe/route.ts @@ -1,4 +1,4 @@ -import { NextRequest, NextResponse } from "next/server"; +import {NextRequest, NextResponse} from "next/server"; import mammoth from "mammoth"; import * as cheerio from "cheerio"; @@ -128,8 +128,8 @@ function splitCellContent(content: string): string[] { * 确定餐食类型 */ function getMealType(mealName: string): MealTypeCode | null { - if (mealName.includes("早")) return MealTypeCode.BREAKFAST; - if (mealName.includes("水果")) return MealTypeCode.FRUIT; + if (mealName.includes("早") && !mealName.includes("早点")) return MealTypeCode.BREAKFAST; + if (mealName.includes("水果") || mealName.includes("早点")) return MealTypeCode.FRUIT; if (mealName.includes("中") || mealName.includes("午餐")) return MealTypeCode.LUNCH; if (mealName.includes("午点") || mealName.includes("点心")) return MealTypeCode.SNACK; if (mealName.includes("体弱") || mealName.includes("晚")) return MealTypeCode.SPECIAL; diff --git a/app/page.tsx b/app/page.tsx index 1907de4..ae4aae9 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -71,13 +71,13 @@ interface WeeklyMenu { meals: DailyMeal[]; } -// 餐食类型配置 (体弱儿在第四位) +// 餐食类型配置 const MEAL_TYPES = [ {code: MealTypeCode.BREAKFAST, label: "早餐", icon: Sun}, {code: MealTypeCode.FRUIT, label: "水果餐", icon: Apple}, {code: MealTypeCode.LUNCH, label: "中餐", icon: UtensilsCrossed}, - {code: MealTypeCode.SPECIAL, label: "体弱儿餐", icon: Heart}, {code: MealTypeCode.SNACK, label: "午点", icon: Cookie}, + {code: MealTypeCode.SPECIAL, label: "体弱儿餐", icon: Heart}, ]; type UploadState = "idle" | "uploading" | "parsing" | "done" | "error"; diff --git a/public/file.svg b/public/file.svg deleted file mode 100644 index 004145c..0000000 --- a/public/file.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/globe.svg b/public/globe.svg deleted file mode 100644 index 567f17b..0000000 --- a/public/globe.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/next.svg b/public/next.svg deleted file mode 100644 index 5174b28..0000000 --- a/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/vercel.svg b/public/vercel.svg deleted file mode 100644 index 7705396..0000000 --- a/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/window.svg b/public/window.svg deleted file mode 100644 index b2b2a44..0000000 --- a/public/window.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file