Просмотр исходного кода

refactor(speaking): replace 8 placeholder videos with shape names; drop title from payload

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jimmylee 1 месяц назад
Родитель
Сommit
190b1324f4

+ 8 - 48
src/views/Editor/EnglishSpeaking/data/topicDiscussionVideos.json

@@ -1,50 +1,10 @@
 [
-  {
-    "id": "v1",
-    "title": "Going to school",
-    "videoUrl": "https://example.com/videos/v1.mp4",
-    "description": "A child walks to school in the morning, passing a park and meeting friends at the bus stop."
-  },
-  {
-    "id": "v2",
-    "title": "Family breakfast",
-    "videoUrl": "https://example.com/videos/v2.mp4",
-    "description": "A family of four eats breakfast together; the parents prepare eggs while children pour milk."
-  },
-  {
-    "id": "v3",
-    "title": "At the zoo",
-    "videoUrl": "https://example.com/videos/v3.mp4",
-    "description": "Visitors watch pandas eating bamboo behind a glass enclosure on a sunny afternoon."
-  },
-  {
-    "id": "v4",
-    "title": "Library reading",
-    "videoUrl": "https://example.com/videos/v4.mp4",
-    "description": "A student picks a book from the shelf, sits at a long table, and reads quietly."
-  },
-  {
-    "id": "v5",
-    "title": "Birthday party",
-    "videoUrl": "https://example.com/videos/v5.mp4",
-    "description": "Children gather around a cake with candles, singing and clapping at a friend's birthday."
-  },
-  {
-    "id": "v6",
-    "title": "Rainy day",
-    "videoUrl": "https://example.com/videos/v6.mp4",
-    "description": "A person walks home in heavy rain holding a yellow umbrella, jumping over puddles."
-  },
-  {
-    "id": "v7",
-    "title": "Soccer practice",
-    "videoUrl": "https://example.com/videos/v7.mp4",
-    "description": "Kids practice dribbling and passing a soccer ball on a green grass field after school."
-  },
-  {
-    "id": "v8",
-    "title": "Cooking dinner",
-    "videoUrl": "https://example.com/videos/v8.mp4",
-    "description": "A teenager helps a parent chop vegetables and stir a pot in a brightly lit kitchen."
-  }
+  { "id": "v1", "title": "heart",     "videoUrl": "https://example.com/videos/v1.mp4", "description": "heart" },
+  { "id": "v2", "title": "square",    "videoUrl": "https://example.com/videos/v2.mp4", "description": "square" },
+  { "id": "v3", "title": "circle",    "videoUrl": "https://example.com/videos/v3.mp4", "description": "circle" },
+  { "id": "v4", "title": "oval",      "videoUrl": "https://example.com/videos/v4.mp4", "description": "oval" },
+  { "id": "v5", "title": "rectangle", "videoUrl": "https://example.com/videos/v5.mp4", "description": "rectangle" },
+  { "id": "v6", "title": "star",      "videoUrl": "https://example.com/videos/v6.mp4", "description": "star" },
+  { "id": "v7", "title": "triangle",  "videoUrl": "https://example.com/videos/v7.mp4", "description": "triangle" },
+  { "id": "v8", "title": "diamond",   "videoUrl": "https://example.com/videos/v8.mp4", "description": "diamond" }
 ]

+ 7 - 1
src/views/Editor/EnglishSpeaking/services/llmService.ts

@@ -249,7 +249,13 @@ export class RealDialogueAPI implements DialogueAPI {
         configId: config.configId ?? null,
         userId: config.userId ?? null,
         mode: config.mode ?? 'normal',
-        selectedVideo: config.selectedVideo ?? null,
+        selectedVideo: config.selectedVideo
+          ? {
+              id: config.selectedVideo.id,
+              videoUrl: config.selectedVideo.videoUrl,
+              description: config.selectedVideo.description,
+            }
+          : null,
       }),
     })
     if (!res.ok) {