pref: add api prefix

This commit is contained in:
KUN1007 2023-10-29 17:16:02 +08:00
parent 053b8ba288
commit 3548aacb40
2 changed files with 4 additions and 3 deletions

View file

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

View file

@ -12,8 +12,8 @@ const isShowPanel = ref('')
// Background image, this is the backend's URL
const backgroundImageUrl = `${
import.meta.env.VITE_API_BASE_URL
}/uploads/login/login.webp`
import.meta.env.VITE_API_UPLOADS_URL
}/login/login.webp`
// Click login, slide the panel
const handleClickSignIn = () => {