temp.
This commit is contained in:
@@ -1,27 +1,28 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { LANGUAGE } from "~/utils/types"
|
// import { LANGUAGE } from "~/utils/types"
|
||||||
|
|
||||||
interface Props {
|
// interface Props {
|
||||||
lang: LANGUAGE
|
// lang: LANGUAGE
|
||||||
input: string
|
// input: string
|
||||||
}
|
// }
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
// const props = withDefaults(defineProps<Props>(), {
|
||||||
lang: "C",
|
// lang: "C",
|
||||||
input: "",
|
// input: "",
|
||||||
})
|
// })
|
||||||
function gotoTestCat() {
|
function gotoTestCat() {
|
||||||
const url = "https://code.hyyz.izhai.net/"
|
const url = "https://code.hyyz.izhai.net/"
|
||||||
let id = 50
|
// let id = 50
|
||||||
const lang = props.lang
|
// const lang = props.lang
|
||||||
if (lang === "Python3") id = 71
|
// if (lang === "Python3") id = 71
|
||||||
if (lang === "Java") id = 62
|
// if (lang === "Java") id = 62
|
||||||
const payload = { input: props.input || "", id }
|
// const payload = { input: props.input || "", id }
|
||||||
try {
|
// try {
|
||||||
const encoded = window.btoa(encodeURIComponent(JSON.stringify(payload)))
|
// const encoded = window.btoa(encodeURIComponent(JSON.stringify(payload)))
|
||||||
window.open(`${url}?stdin=${encoded}`, "_blank")
|
// window.open(`${url}?stdin=${encoded}`, "_blank")
|
||||||
} catch (e) {
|
// } catch (e) {
|
||||||
window.open(url, "_blank")
|
// window.open(url, "_blank")
|
||||||
}
|
// }
|
||||||
|
window.open(url, "_blank")
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
Reference in New Issue
Block a user