移除 OI 残留:前端 Profile / Rank 去掉 oi_problems_status / total_score
配合后端删除 UserProfile 的 OI 字段: - Profile、Rank 类型移除 oi_problems_status、total_score - 用户主页 AC 列表只用 acm_problems_status,去掉 oi 合并 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -98,15 +98,12 @@ async function init() {
|
|||||||
const res = await getProfile(route.query.name as string)
|
const res = await getProfile(route.query.name as string)
|
||||||
profile.value = res.data
|
profile.value = res.data
|
||||||
const acm = res.data.acm_problems_status.problems || {}
|
const acm = res.data.acm_problems_status.problems || {}
|
||||||
const oi = res.data.oi_problems_status.problems || {}
|
|
||||||
const ac: string[] = []
|
const ac: string[] = []
|
||||||
for (let problems of [acm, oi]) {
|
Object.keys(acm).forEach((id) => {
|
||||||
Object.keys(problems).forEach((id) => {
|
if (acm[id]["status"] === 0) {
|
||||||
if (problems[id]["status"] === 0) {
|
ac.push(acm[id]["_id"])
|
||||||
ac.push(problems[id]["_id"])
|
}
|
||||||
}
|
})
|
||||||
})
|
|
||||||
}
|
|
||||||
ac.sort()
|
ac.sort()
|
||||||
problems.value = ac
|
problems.value = ac
|
||||||
const promises: Promise<{ data: any }>[] = []
|
const promises: Promise<{ data: any }>[] = []
|
||||||
|
|||||||
@@ -12,15 +12,6 @@ export interface Profile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
oi_problems_status: {
|
|
||||||
problems: {
|
|
||||||
[key: string]: {
|
|
||||||
_id: string
|
|
||||||
score: number
|
|
||||||
status: number
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
avatar: string
|
avatar: string
|
||||||
blog: null
|
blog: null
|
||||||
mood: string
|
mood: string
|
||||||
@@ -29,7 +20,6 @@ export interface Profile {
|
|||||||
major: string
|
major: string
|
||||||
language: string
|
language: string
|
||||||
accepted_number: number
|
accepted_number: number
|
||||||
total_score: number
|
|
||||||
submission_number: number
|
submission_number: number
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -492,7 +482,6 @@ export interface Rank {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
oi_problems_status: {}
|
|
||||||
real_name: null | string
|
real_name: null | string
|
||||||
avatar: string
|
avatar: string
|
||||||
blog: null
|
blog: null
|
||||||
@@ -502,7 +491,6 @@ export interface Rank {
|
|||||||
major: null | string
|
major: null | string
|
||||||
language: null | string
|
language: null | string
|
||||||
accepted_number: number
|
accepted_number: number
|
||||||
total_score: number
|
|
||||||
submission_number: number
|
submission_number: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user