跳转到首页
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
import { ref } from "vue"
|
||||
import type { SubmissionAll } from "../utils/type"
|
||||
import { TASK_TYPE } from "../utils/const"
|
||||
|
||||
export const submission = ref<SubmissionAll>({
|
||||
id: "",
|
||||
userid: 0,
|
||||
username: "",
|
||||
task_id: 0,
|
||||
task_display: 0, // 这是序号
|
||||
task_title: "",
|
||||
task_type: "tutorial",
|
||||
task_type: TASK_TYPE.Tutorial,
|
||||
score: 0.0,
|
||||
my_score: 0,
|
||||
html: "",
|
||||
|
||||
@@ -2,7 +2,7 @@ import { ref } from "vue"
|
||||
import { TASK_TYPE } from "../utils/const"
|
||||
|
||||
const urlParams = new URLSearchParams(window.location.search)
|
||||
const currentTask = urlParams.get("task") ?? TASK_TYPE.Tutorial
|
||||
const currentTask = (urlParams.get("task") as TASK_TYPE) ?? TASK_TYPE.Tutorial
|
||||
|
||||
export const taskTab = ref(currentTask)
|
||||
export const taskId = ref(0)
|
||||
|
||||
Reference in New Issue
Block a user