From a15b3d9c76255d0efff7079b51184f24d8c4fe22 Mon Sep 17 00:00:00 2001
From: yuetsh <517252939@qq.com>
Date: Thu, 11 Jun 2026 19:53:12 -0600
Subject: [PATCH] rating when ai is steaming
---
src/api.ts | 8 ++
src/components/ai/RandomRatingModal.vue | 135 ++++++++++++++++++++++++
src/pages/ChallengeDetail.vue | 2 +
src/utils/type.ts | 11 ++
4 files changed, 156 insertions(+)
create mode 100644 src/components/ai/RandomRatingModal.vue
diff --git a/src/api.ts b/src/api.ts
index 6bc4ba2..04e2a35 100644
--- a/src/api.ts
+++ b/src/api.ts
@@ -20,6 +20,7 @@ import type {
ShowcaseSubmissionLookupOut,
ShowcaseDetail,
PromptRound,
+ RandomRatingItem,
} from "./utils/type"
import { BASE_URL, STORAGE_KEY } from "./utils/const"
@@ -237,6 +238,13 @@ export const Submission = {
return res.data
},
+ async randomForRating(excludeId?: string) {
+ const res = await http.get("/submission/random-for-rating/", {
+ params: excludeId ? { exclude_id: excludeId } : {},
+ })
+ return res.data as RandomRatingItem | null
+ },
+
async updateFlag(id: string, flag: FlagType) {
const res = await http.put(`/submission/${id}/flag`, { flag })
return res.data
diff --git a/src/components/ai/RandomRatingModal.vue b/src/components/ai/RandomRatingModal.vue
new file mode 100644
index 0000000..3953583
--- /dev/null
+++ b/src/components/ai/RandomRatingModal.vue
@@ -0,0 +1,135 @@
+
+
+
+ {{ current.task_title }} · 提交者 {{ current.username }}
+
+
+
+
+
+
+
+
+ 打分后自动换下一个作品;AI 回复完成后弹窗会自动关闭
+
+
+
+
+
+
+
diff --git a/src/pages/ChallengeDetail.vue b/src/pages/ChallengeDetail.vue
index 8f41c6d..b462ce4 100644
--- a/src/pages/ChallengeDetail.vue
+++ b/src/pages/ChallengeDetail.vue
@@ -95,6 +95,7 @@
+