update
Some checks failed
Deploy / deploy (build, debian, 22) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822) (push) Has been cancelled

This commit is contained in:
2026-03-04 00:04:45 +08:00
parent 564f0b3f21
commit 78a2d84335
17 changed files with 687 additions and 310 deletions

View File

@@ -6,10 +6,12 @@ export function parseTime(utc: Date | string, format = "YYYY年M月D日") {
return time.value
}
export function goHome(router: any, type: TASK_TYPE, step: number) {
const query = { type } as any
export function goHome(router: any, type: TASK_TYPE, display: number) {
if (type === TASK_TYPE.Tutorial) {
query.step = step
router.push({ name: "home-tutorial", params: { display } })
} else if (type === TASK_TYPE.Challenge) {
router.push({ name: "home-challenge", params: { display } })
} else {
router.push({ name: "home" })
}
router.push({ name: "home", query })
}

View File

@@ -30,6 +30,21 @@ export interface TutorialIn {
content: string
}
export interface ChallengeSlim {
display: number
title: string
score: number
is_public: boolean
}
export interface ChallengeIn {
display: number
title: string
content: string
score: number
is_public: boolean
}
export interface User {
id: number
username: string