From e7a621075c171853049a663363c1af2158c78f68 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Sat, 4 Jul 2026 11:43:11 -0600 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=20OI=20=E6=AE=8B=E7=95=99?= =?UTF-8?q?=EF=BC=9A=E5=89=8D=E7=AB=AF=20Profile=20/=20Rank=20=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=20oi=5Fproblems=5Fstatus=20/=20total=5Fscore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 配合后端删除 UserProfile 的 OI 字段: - Profile、Rank 类型移除 oi_problems_status、total_score - 用户主页 AC 列表只用 acm_problems_status,去掉 oi 合并 Co-Authored-By: Claude Opus 4.8 --- src/oj/user/index.vue | 13 +++++-------- src/utils/types.ts | 12 ------------ 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/src/oj/user/index.vue b/src/oj/user/index.vue index 654d2be..55ba92d 100644 --- a/src/oj/user/index.vue +++ b/src/oj/user/index.vue @@ -98,15 +98,12 @@ async function init() { const res = await getProfile(route.query.name as string) profile.value = res.data const acm = res.data.acm_problems_status.problems || {} - const oi = res.data.oi_problems_status.problems || {} const ac: string[] = [] - for (let problems of [acm, oi]) { - Object.keys(problems).forEach((id) => { - if (problems[id]["status"] === 0) { - ac.push(problems[id]["_id"]) - } - }) - } + Object.keys(acm).forEach((id) => { + if (acm[id]["status"] === 0) { + ac.push(acm[id]["_id"]) + } + }) ac.sort() problems.value = ac const promises: Promise<{ data: any }>[] = [] diff --git a/src/utils/types.ts b/src/utils/types.ts index d918638..525b283 100644 --- a/src/utils/types.ts +++ b/src/utils/types.ts @@ -12,15 +12,6 @@ export interface Profile { } } } - oi_problems_status: { - problems: { - [key: string]: { - _id: string - score: number - status: number - } - } - } avatar: string blog: null mood: string @@ -29,7 +20,6 @@ export interface Profile { major: string language: string accepted_number: number - total_score: number submission_number: number } @@ -492,7 +482,6 @@ export interface Rank { } } } - oi_problems_status: {} real_name: null | string avatar: string blog: null @@ -502,7 +491,6 @@ export interface Rank { major: null | string language: null | string accepted_number: number - total_score: number submission_number: number }