feat: 增加本地环境变量

This commit is contained in:
YeMingfei666 2025-03-31 08:59:23 +08:00
parent 4e9f5f3eeb
commit 6c4de56cd5
2 changed files with 22 additions and 0 deletions

21
.env.location Normal file
View File

@ -0,0 +1,21 @@
# 应用端口
VITE_APP_PORT=3000
# 代理前缀
VITE_APP_BASE_API=/dev-api
# 接口地址
# VITE_APP_API_URL=https://tapi.cashier.sxczgkj.cn/ # 测试
# VITE_APP_API_URL=https://cashier.sxczgkj.com/ # 正式
VITE_APP_API_URL=http://192.168.1.31/ # 本地
# WebSocket 端点(不配置则关闭),线上 ws://api.youlai.tech/ws ,本地 ws://localhost:8989/ws
# VITE_APP_WS_ENDPOINT=wss://sockets.sxczgkj.com/wss
VITE_APP_WS_ENDPOINT=wss://czgeatws.sxczgkj.com/wss # 正式
# VITE_APP_WS_ENDPOINT=ws://192.168.1.31 # 本地
# 启用 Mock 服务
VITE_MOCK_DEV_SERVER=false

View File

@ -8,6 +8,7 @@
"build": "vue-tsc --noEmit & vite build",
"build:test": "vue-tsc --noEmit & vite build --mode test",
"build:pro": "vue-tsc --noEmit & vite build --mode production",
"build:local": "vue-tsc --noEmit & vite build --mode location",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit",