BUG fixed: background image
This commit is contained in:
parent
3548aacb40
commit
8c50d2202c
|
@ -1,6 +1,5 @@
|
||||||
# Custom Environment Variables (Must be named with VITE_ prefix)
|
# 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_UPLOADS_URL = `http://127.0.0.1:10007/uploads`
|
||||||
VITE_API_BASE_URL = `http://127.0.0.1:10007/api`
|
VITE_API_BASE_URL = `http://127.0.0.1:10007/api`
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ const { showKUNGalgameBackground, showKUNGalgameCustomBackground } =
|
||||||
|
|
||||||
// Fetch background image data from the backend
|
// Fetch background image data from the backend
|
||||||
const fetchGetBackground = async (imageName: string): Promise<Blob> => {
|
const fetchGetBackground = async (imageName: string): Promise<Blob> => {
|
||||||
const baseUrl = import.meta.env.VITE_API_BASE_URL
|
const baseUrl = import.meta.env.VITE_API_UPLOADS_URL
|
||||||
const url = `/uploads/image/bg/${imageName}.webp`
|
const url = `/image/bg/${imageName}.webp`
|
||||||
const fullUrl = `${baseUrl}${url}`
|
const fullUrl = `${baseUrl}${url}`
|
||||||
const response = await fetch(fullUrl, {
|
const response = await fetch(fullUrl, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
|
Loading…
Reference in a new issue