fix(ci): 修复基础URL配置问题
All checks were successful
site-dist-deploy / build-and-deploy (push) Successful in 1m16s

将VITE_APP_BASE_URL默认值设置为'/',避免环境变量未定义时请求失败
This commit is contained in:
shanshanzhong 2026-01-06 19:36:37 -08:00
parent 8b5444919a
commit fa29905c7c
2 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ on:
env:
VITE_APP_BASE_URL: https://h.hifastapp.com
VITE_APP_BASE_URL: /
SSH_HOST: ${{ vars.PRO_SSH_HOST }}
SSH_PORT: ${{ vars.PRO_SSH_PORT }}
SSH_USER: ${{ vars.PRO_SSH_USER }}
@ -42,7 +42,7 @@ jobs:
- name: Build dist with Unified Script
env:
VITE_APP_BASE_URL: "https://h.hifastapp.com"
VITE_APP_BASE_URL: "/"
run: |
chmod +x scripts/ci-build.sh
./scripts/ci-build.sh

View File

@ -1,6 +1,6 @@
import Request from './core'
export * from './core'
const baseUrl = import.meta.env.VITE_APP_BASE_URL
const baseUrl = import.meta.env.VITE_APP_BASE_URL || '/'
const request = new Request({
baseURL: baseUrl,