修正环境设置

This commit is contained in:
niyyzf 2024-06-30 10:26:31 +08:00
parent e4eb2e8e20
commit ee9f6d392a
8 changed files with 5 additions and 4 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1 +0,0 @@
API_SERVER="http://127.0.0.1:5253"

1
web/.env.development Normal file
View File

@ -0,0 +1 @@
NUXT_API_URL="http://127.0.0.1:5253"

1
web/.env.production Normal file
View File

@ -0,0 +1 @@
NUXT_API_URL="http://localhost:3000"

View File

@ -42,7 +42,7 @@ export default defineNuxtConfig({
],
runtimeConfig: {
baseUrl: '', public: {
apiBase: '/Api', baseUrl: process.env.API_SERVER
apiBase: '/Api', baseUrl: process.env.NUXT_API_URL
}
},
googleFonts: {

View File

@ -3,8 +3,8 @@
"private": true,
"type": "module",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"build": "nuxt build --dotenv .env.production",
"dev": "nuxt dev --dotenv .env.development",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare",