chengjie 4 kuukautta sitten
vanhempi
commit
9352ee8ae8
1 muutettua tiedostoa jossa 23 lisäystä ja 0 poistoa
  1. 23 0
      src/api/yjbdc/yjbdcController.js

+ 23 - 0
src/api/yjbdc/yjbdcController.js

@@ -370,6 +370,29 @@ export async function GeneratePDF(ctx) {
370 370
         ctx.body = { error: 'Invalid request body: Content is required' };
371 371
         return;
372 372
     }
373
+    //文章类型
374
+    const ARTICLE_STYLE={
375
+        "成长":"Personal Growth",
376
+        "童话":"Fairy Tales",
377
+        "家庭亲子":"Family Stories",
378
+        "人生励志":"Inspirational",
379
+        "科幻":"Science Fiction",
380
+        "奇幻":"Fantasy",
381
+        "校园生活":"School Life",
382
+        "节日文化":"Cultural Stories",
383
+        "旅行":"Travel Stories",
384
+        "科普":"Popular Science",
385
+        "动物":"Animal Stories",
386
+        "环保":"Environmental Stories",
387
+    };
388
+
389
+    //等级难度
390
+    const LEVEL=[
391
+        "Primary school vocabulary size",
392
+        "Junior high school vocabulary size",
393
+        "High school vocabulary size",
394
+        "College vocabulary size"
395
+    ]
373 396
 
374 397
     const content = params.Content;
375 398
     //console.log("Generating PDF with content:", JSON.stringify(content).substring(0, 200) + "...");