Client App

This commit is contained in:
Donald Zou
2025-08-16 12:27:50 +08:00
parent 1867db5c99
commit 430a6053ef
4 changed files with 49 additions and 49 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -28,7 +28,7 @@
}
}
</style>
<script type="module" crossorigin src="/static/client/dist/assets/index-DMoJJGnR.js"></script>
<script type="module" crossorigin src="/static/client/dist/assets/index-Cun74Xi8.js"></script>
<link rel="stylesheet" crossorigin href="/static/client/dist/assets/index-tn8r-uDQ.css">
</head>
<body>
+7 -7
View File
@@ -6,7 +6,7 @@ export const requestURl = (url) => {
: `${window.location.protocol}//${(window.location.host + window.location.pathname + url).replace(/\/\//g, '/')}`
}
const router = useRouter()
// const router = useRouter()
export const axiosPost = async (URL, body = {}) => {
try{
@@ -14,9 +14,9 @@ export const axiosPost = async (URL, body = {}) => {
return res.data
} catch (error){
console.log(error)
if (error.status === 401){
await router.push('/signin')
}
// if (error.status === 401){
// await router.push('/signin')
// }
return undefined
}
@@ -28,9 +28,9 @@ export const axiosGet = async (URL, query = {}) => {
return res.data
} catch (error){
console.log(error)
if (error.status === 401){
await router.push('/signin')
}
// if (error.status === 401){
// await router.push('/signin')
// }
return undefined
}
}