fix(deploy): serve production API over HTTP

This commit is contained in:
david
2026-07-31 16:54:57 +08:00
parent 8207d3a700
commit 7a1a7c2da6
10 changed files with 10 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
rest.heqiapp.com { http://rest.heqiapp.com {
request_body { request_body {
max_size 500MB max_size 500MB
} }

View File

@@ -1,4 +1,4 @@
# 可选覆盖;开发默认 http://localhost:12426/heqi/delivery/v1生产构建默认 https://rest.heqiapp.com/heqi/delivery/v1。 # 可选覆盖;开发默认 http://localhost:12426/heqi/delivery/v1生产构建默认 http://rest.heqiapp.com/heqi/delivery/v1。
VITE_API_BASE_URL= VITE_API_BASE_URL=
# 受保护 API 使用 BSM JWT本地联调时由认证服务签发不要提交真实令牌。 # 受保护 API 使用 BSM JWT本地联调时由认证服务签发不要提交真实令牌。
VITE_DEV_JWT= VITE_DEV_JWT=

View File

@@ -1,6 +1,6 @@
# 和气配送点管理系统 # 和气配送点管理系统
配送点管理端使用 Vue 3、TypeScript、Vite、Pinia 和 Arco Design开发端口为 `5176`。开发默认 API 为 `http://localhost:12426/heqi/delivery/v1`,生产构建默认 API 为 `https://rest.heqiapp.com/heqi/delivery/v1` 配送点管理端使用 Vue 3、TypeScript、Vite、Pinia 和 Arco Design开发端口为 `5176`。开发默认 API 为 `http://localhost:12426/heqi/delivery/v1`,生产构建默认 API 为 `http://rest.heqiapp.com/heqi/delivery/v1`
```bash ```bash
pnpm install pnpm install

View File

@@ -32,7 +32,7 @@ export default defineConfig(({ command, mode }) => {
const env = loadEnv(mode, process.cwd(), ''); const env = loadEnv(mode, process.cwd(), '');
const apiBaseURL = const apiBaseURL =
env.VITE_API_BASE_URL || env.VITE_API_BASE_URL ||
`${isDev ? 'http://localhost:12426' : 'https://rest.heqiapp.com'}/heqi/delivery/v1`; `${isDev ? 'http://localhost:12426' : 'http://rest.heqiapp.com'}/heqi/delivery/v1`;
const plugins: PluginOption[] = [ const plugins: PluginOption[] = [
vue(), vue(),

View File

@@ -1,4 +1,4 @@
# 可选覆盖;开发默认 http://localhost:12426/heqi/gas/v1生产构建默认 https://rest.heqiapp.com/heqi/gas/v1。 # 可选覆盖;开发默认 http://localhost:12426/heqi/gas/v1生产构建默认 http://rest.heqiapp.com/heqi/gas/v1。
VITE_API_BASE_URL= VITE_API_BASE_URL=
# 受保护 API 使用 BSM JWT本地联调时由认证服务签发不要提交真实令牌。 # 受保护 API 使用 BSM JWT本地联调时由认证服务签发不要提交真实令牌。
VITE_DEV_JWT= VITE_DEV_JWT=

View File

@@ -23,5 +23,5 @@ pnpm build
| 变量 | 说明 | | 变量 | 说明 |
| --- | --- | | --- | --- |
| `VITE_API_BASE_URL` | 可选覆盖后端 API 地址;开发默认 `http://localhost:12426/heqi/gas/v1`,生产构建默认 `https://rest.heqiapp.com/heqi/gas/v1` | | `VITE_API_BASE_URL` | 可选覆盖后端 API 地址;开发默认 `http://localhost:12426/heqi/gas/v1`,生产构建默认 `http://rest.heqiapp.com/heqi/gas/v1` |
| `VITE_ERROR_REPORT_URL` | 可选的前端错误上报地址 | | `VITE_ERROR_REPORT_URL` | 可选的前端错误上报地址 |

View File

@@ -32,7 +32,7 @@ export default defineConfig(({ command, mode }) => {
const env = loadEnv(mode, process.cwd(), ''); const env = loadEnv(mode, process.cwd(), '');
const apiBaseURL = const apiBaseURL =
env.VITE_API_BASE_URL || env.VITE_API_BASE_URL ||
`${isDev ? 'http://localhost:12426' : 'https://rest.heqiapp.com'}/heqi/gas/v1`; `${isDev ? 'http://localhost:12426' : 'http://rest.heqiapp.com'}/heqi/gas/v1`;
const plugins: PluginOption[] = [ const plugins: PluginOption[] = [
vue(), vue(),

View File

@@ -1,4 +1,4 @@
# 可选覆盖;开发默认 http://localhost:12426/heqi/platform/v1生产构建默认 https://rest.heqiapp.com/heqi/platform/v1。 # 可选覆盖;开发默认 http://localhost:12426/heqi/platform/v1生产构建默认 http://rest.heqiapp.com/heqi/platform/v1。
VITE_API_BASE_URL= VITE_API_BASE_URL=
# 受保护 API 使用 BSM JWT本地联调时由认证服务签发不要提交真实令牌。 # 受保护 API 使用 BSM JWT本地联调时由认证服务签发不要提交真实令牌。
VITE_DEV_JWT= VITE_DEV_JWT=

View File

@@ -36,5 +36,5 @@ pnpm build
| 变量 | 说明 | | 变量 | 说明 |
| --- | --- | | --- | --- |
| `VITE_API_BASE_URL` | 可选覆盖后端 API 地址;开发默认 `http://localhost:12426/heqi/platform/v1`,生产构建默认 `https://rest.heqiapp.com/heqi/platform/v1` | | `VITE_API_BASE_URL` | 可选覆盖后端 API 地址;开发默认 `http://localhost:12426/heqi/platform/v1`,生产构建默认 `http://rest.heqiapp.com/heqi/platform/v1` |
| `VITE_ERROR_REPORT_URL` | 可选的前端错误上报地址 | | `VITE_ERROR_REPORT_URL` | 可选的前端错误上报地址 |

View File

@@ -32,7 +32,7 @@ export default defineConfig(({ command, mode }) => {
const env = loadEnv(mode, process.cwd(), ''); const env = loadEnv(mode, process.cwd(), '');
const apiBaseURL = const apiBaseURL =
env.VITE_API_BASE_URL || env.VITE_API_BASE_URL ||
`${isDev ? 'http://localhost:12426' : 'https://rest.heqiapp.com'}/heqi/platform/v1`; `${isDev ? 'http://localhost:12426' : 'http://rest.heqiapp.com'}/heqi/platform/v1`;
const plugins: PluginOption[] = [ const plugins: PluginOption[] = [
vue(), vue(),