update
This commit is contained in:
@@ -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 })
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user