跳转到首页
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
import { useDateFormat } from "@vueuse/core"
|
||||
import { TASK_TYPE } from "./const"
|
||||
|
||||
export function parseTime(utc: Date | string, format = "YYYY年M月D日") {
|
||||
const time = useDateFormat(utc, format, { locales: "zh-CN" })
|
||||
return time.value
|
||||
}
|
||||
|
||||
export function goHome(router: any, type: TASK_TYPE, step: number) {
|
||||
const query = { type } as any
|
||||
if (type === TASK_TYPE.Tutorial) {
|
||||
query.step = step
|
||||
}
|
||||
router.push({ name: "home", query })
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import type { TASK_TYPE } from "./const"
|
||||
|
||||
export enum Role {
|
||||
Super = "super",
|
||||
Admin = "admin",
|
||||
@@ -41,7 +43,8 @@ export interface SubmissionOut {
|
||||
id: string
|
||||
userid: number
|
||||
username: string
|
||||
task_type: string
|
||||
task_display: number
|
||||
task_type: TASK_TYPE
|
||||
task_title: string
|
||||
score: number
|
||||
my_score: number
|
||||
@@ -54,7 +57,8 @@ export interface SubmissionAll {
|
||||
userid: number
|
||||
username: string
|
||||
task_id: number
|
||||
task_type: string
|
||||
task_display: number
|
||||
task_type: TASK_TYPE
|
||||
task_title: string
|
||||
score: number
|
||||
my_score: number
|
||||
|
||||
Reference in New Issue
Block a user