From 73155d0bd2d5cb890eebda5234be10c0bcb725d8 Mon Sep 17 00:00:00 2001 From: weicw1996 Date: Fri, 23 Oct 2026 14:20:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(manuscript):=20=E7=A8=BF=E4=BB=B6=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=94=B6=E6=95=9B=E5=88=B0=E4=B8=8A=E6=B8=B8=20doc=5F?= =?UTF-8?q?type=20=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 「公众号推文」「发言稿提纲」这几个模板点下去必定失败:前端把界面 标签原样当成 doc_type 下发,而上游工作流只认 新闻稿 / 活动总结 / 微信推文 / 通知公告,多给一个值就是一次 `doc_type in input form must be one of the following` 的报错, 学生侧只看到「生成失败,请稍后重试」。 - docTypeOptions 只保留上游有的四种(外加「自由创作」), 「宣传稿」「发言稿」「短视频脚本」一并删掉 - 「公众号推文」保留这个叫法,下发值改成「微信推文」 - 快捷模板「发言稿提纲」换成「通知公告」,并补对应示例内容 --- src/views/gxmu/manuscriptGen/index.vue | 38 +++++++++++++++----------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/src/views/gxmu/manuscriptGen/index.vue b/src/views/gxmu/manuscriptGen/index.vue index 58df50e..343b815 100644 --- a/src/views/gxmu/manuscriptGen/index.vue +++ b/src/views/gxmu/manuscriptGen/index.vue @@ -4,7 +4,7 @@
AI CONTENT STUDIO

AI内容创作与宣传助手

-

写新闻稿、推文、发言稿,或直接说明你的需求,AI 先给出一份初稿,可以接着改。

+

写新闻稿、活动总结、公众号推文或通知公告,说清需求就行,AI 先给出一份初稿,可以接着改。

进入问答助手 @@ -18,7 +18,7 @@
活动新闻稿 公众号推文 - 发言稿提纲 + 通知公告 自由创作示例
@@ -233,7 +233,7 @@ content: string; } - type DemoType = 'news' | 'wechat' | 'speech' | 'free'; + type DemoType = 'news' | 'wechat' | 'notice' | 'free'; /** 等「流结束」的挂起点:只由 __END__ 帧或请求收尾来 resolve */ type StreamResolver = { resolve: () => void; @@ -273,15 +273,20 @@ number: 800 }); + /** + * 选项必须与上游「内容创作与宣传助手」的 doc_type 枚举逐一对应: + * 新闻稿 / 活动总结 / 微信推文 / 通知公告。 + * 多给一个上游没有的值,点下去就是一次必失败的提交(实测返回 + * `doc_type in input form must be one of the following: [...]`), + * 所以这里不提供「宣传稿」「发言稿」「短视频脚本」这类上游没有的文体。 + */ const docTypeOptions = [ // 自由创作:表单只留一个内容输入框,提交时不带 docType { label: '自由创作(不套模板)', value: DOC_TYPE_FREE }, { label: '新闻稿', value: '新闻稿' }, - { label: '公众号推文', value: '公众号推文' }, - { label: '宣传稿', value: '宣传稿' }, { label: '活动总结', value: '活动总结' }, - { label: '发言稿', value: '发言稿' }, - { label: '短视频脚本', value: '短视频脚本' } + { label: '公众号推文', value: '微信推文' }, + { label: '通知公告', value: '通知公告' } ]; const eventTypeOptions = [ @@ -600,7 +605,7 @@ } if (type === 'wechat') { form.theme = '青春集结!这场校园科技文化节亮点抢先看'; - form.docType = '公众号推文'; + form.docType = '微信推文'; form.eventType = '校园活动'; form.time = '2026年4月中旬'; form.location = '大学生活动中心'; @@ -610,14 +615,15 @@ form.number = 1200; return; } - form.theme = '在学校共青团工作会议上的发言提纲'; - form.docType = '发言稿'; - form.eventType = '会议论坛'; - form.time = '2026年春季学期工作会议'; - form.location = '学校综合楼报告厅'; - form.participants = '各学院团委书记、团干部代表'; - form.highlights = '总结上阶段工作,分析问题不足,部署下一阶段思想引领、基层组织建设和实践育人重点任务。'; - form.number = 1500; + form.theme = '关于举办2026年广西医科大学青年志愿服务项目大赛的通知'; + form.docType = '通知公告'; + form.eventType = '志愿服务'; + form.time = '2026年4月10日至5月20日'; + form.location = '各学院团委、大学生活动中心'; + form.participants = '全校各团支部、青年志愿者服务队'; + form.highlights = + '说明报名条件、赛程安排、材料提交截止时间和联系方式,语气正式、条目清晰。'; + form.number = 600; }; const removeUploadedFile = (index: number) => {