This commit is contained in:
2025-05-08 19:27:21 +08:00
parent 486ea309a2
commit 06908e165d
4 changed files with 5 additions and 4 deletions

1
.env
View File

@@ -1 +0,0 @@
VITE_JUDGE0_URL=https://judge0.xuyue.cc

View File

@@ -1 +0,0 @@
VITE_JUDGE0_URL=https://judge0.xuyue.cc

View File

@@ -1 +0,0 @@
VITE_JUDGE0_URL=http://10.13.114.214:8082

View File

@@ -24,8 +24,12 @@ const DEAD_RESULTS = {
},
}
let url = "http://10.13.114.214:8082"
//@ts-ignore
const http = axios.create({ baseURL: import.meta.env.VITE_JUDGE0_URL })
if (import.meta.env.MODE === "production") {
url = "https://judge0.xuyue.cc"
}
const http = axios.create({ baseURL: url })
function encode(string?: string) {
return btoa(String.fromCharCode(...new TextEncoder().encode(string ?? "")))