fix UI
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
2025-09-29 21:19:57 +08:00
parent e291a194a9
commit ad7ea92769
11 changed files with 874 additions and 200 deletions

View File

@@ -1,4 +1,6 @@
import axios from "axios"
import storage from "./storage"
import { STORAGE_KEY } from "./constants"
const http = axios.create({
baseURL: "/api",
@@ -9,8 +11,9 @@ const http = axios.create({
http.interceptors.response.use(
(res) => {
if (res.data.error) {
// // TODO: 若后端返回为登录则为session失效应退出当前登录用户
if (res.data.data.startsWith("Please login")) {
if (res.data.data && res.data.data.startsWith("Please login")) {
storage.remove(STORAGE_KEY.AUTHED)
window.location.reload()
}
return Promise.reject(res.data)
} else {

View File

@@ -247,7 +247,7 @@ export interface SubmissionListPayload {
username?: string
contest_id?: string
problem_id?: string
language?: LANGUAGE
language: LANGUAGE | ""
page: number
limit: number
offset: number