BUG fixed: background image

This commit is contained in:
KUN1007 2023-10-29 19:07:16 +08:00
parent 3548aacb40
commit 8c50d2202c
2 changed files with 2 additions and 3 deletions

View file

@ -1,6 +1,5 @@
# Custom Environment Variables (Must be named with VITE_ prefix)
## Development Environment Address Prefix (usually '/' or './') TODO:
VITE_API_UPLOADS_URL = `http://127.0.0.1:10007/uploads`
VITE_API_BASE_URL = `http://127.0.0.1:10007/api`

View file

@ -10,8 +10,8 @@ const { showKUNGalgameBackground, showKUNGalgameCustomBackground } =
// Fetch background image data from the backend
const fetchGetBackground = async (imageName: string): Promise<Blob> => {
const baseUrl = import.meta.env.VITE_API_BASE_URL
const url = `/uploads/image/bg/${imageName}.webp`
const baseUrl = import.meta.env.VITE_API_UPLOADS_URL
const url = `/image/bg/${imageName}.webp`
const fullUrl = `${baseUrl}${url}`
const response = await fetch(fullUrl, {
method: 'GET',