From 169493fa12cf67a566a336fc9c2c4fb03f750f1e Mon Sep 17 00:00:00 2001 From: Ray Date: Thu, 1 Aug 2024 18:09:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=80=82=E9=85=8D=E5=8F=AF=E9=80=89?= =?UTF-8?q?=E7=AD=94=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/api.ts b/api/api.ts index d8da5f4..fbf312a 100644 --- a/api/api.ts +++ b/api/api.ts @@ -25,6 +25,12 @@ async function getQuestionByDay(date: string) { } async function commitAnswer(answerParam: AnswerParam) { + if (answerParam.questionAnswer.some((answer) => answer.includes("//"))) { + answerParam.questionAnswer = answerParam.questionAnswer.map((answer) => + answer.includes("//") ? answer.split("//")[0] : answer + ); + } + const data = await customfetch(`https://www.questiontest.cn:5988/clientapi/dailyQuestions/commitAnswer`, { method: "POST", headers: { Authorization: globalThis.authToken, "Content-Type": "application/json" },