From 8207d3a7001b5fc16dc190b914937ce375b4cfc6 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 31 Jul 2026 16:44:57 +0800 Subject: [PATCH] fix(frontend): use HTTPS for production API --- frontend/delivery_admin/.env.example | 2 +- frontend/delivery_admin/README.md | 2 +- frontend/delivery_admin/config/vite.config.ts | 2 +- frontend/gas_admin/.env.example | 2 +- frontend/gas_admin/README.md | 2 +- frontend/gas_admin/config/vite.config.ts | 2 +- frontend/platform_admin/.env.example | 2 +- frontend/platform_admin/README.md | 2 +- frontend/platform_admin/config/vite.config.ts | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/frontend/delivery_admin/.env.example b/frontend/delivery_admin/.env.example index f6facdf..95857dd 100644 --- a/frontend/delivery_admin/.env.example +++ b/frontend/delivery_admin/.env.example @@ -1,4 +1,4 @@ -# 可选覆盖;开发默认 http://localhost:12426/heqi/delivery/v1,生产构建默认 http://rest.heqiapp.com/heqi/delivery/v1。 +# 可选覆盖;开发默认 http://localhost:12426/heqi/delivery/v1,生产构建默认 https://rest.heqiapp.com/heqi/delivery/v1。 VITE_API_BASE_URL= # 受保护 API 使用 BSM JWT;本地联调时由认证服务签发,不要提交真实令牌。 VITE_DEV_JWT= diff --git a/frontend/delivery_admin/README.md b/frontend/delivery_admin/README.md index a80ee91..b15593f 100644 --- a/frontend/delivery_admin/README.md +++ b/frontend/delivery_admin/README.md @@ -1,6 +1,6 @@ # 和气配送点管理系统 -配送点管理端使用 Vue 3、TypeScript、Vite、Pinia 和 Arco Design,开发端口为 `5176`。开发默认 API 为 `http://localhost:12426/heqi/delivery/v1`,生产构建默认 API 为 `http://rest.heqiapp.com/heqi/delivery/v1`。 +配送点管理端使用 Vue 3、TypeScript、Vite、Pinia 和 Arco Design,开发端口为 `5176`。开发默认 API 为 `http://localhost:12426/heqi/delivery/v1`,生产构建默认 API 为 `https://rest.heqiapp.com/heqi/delivery/v1`。 ```bash pnpm install diff --git a/frontend/delivery_admin/config/vite.config.ts b/frontend/delivery_admin/config/vite.config.ts index 59788da..d1ce912 100644 --- a/frontend/delivery_admin/config/vite.config.ts +++ b/frontend/delivery_admin/config/vite.config.ts @@ -32,7 +32,7 @@ export default defineConfig(({ command, mode }) => { const env = loadEnv(mode, process.cwd(), ''); const apiBaseURL = env.VITE_API_BASE_URL || - `${isDev ? 'http://localhost:12426' : 'http://rest.heqiapp.com'}/heqi/delivery/v1`; + `${isDev ? 'http://localhost:12426' : 'https://rest.heqiapp.com'}/heqi/delivery/v1`; const plugins: PluginOption[] = [ vue(), diff --git a/frontend/gas_admin/.env.example b/frontend/gas_admin/.env.example index 22eccbe..ec8a8df 100644 --- a/frontend/gas_admin/.env.example +++ b/frontend/gas_admin/.env.example @@ -1,4 +1,4 @@ -# 可选覆盖;开发默认 http://localhost:12426/heqi/gas/v1,生产构建默认 http://rest.heqiapp.com/heqi/gas/v1。 +# 可选覆盖;开发默认 http://localhost:12426/heqi/gas/v1,生产构建默认 https://rest.heqiapp.com/heqi/gas/v1。 VITE_API_BASE_URL= # 受保护 API 使用 BSM JWT;本地联调时由认证服务签发,不要提交真实令牌。 VITE_DEV_JWT= diff --git a/frontend/gas_admin/README.md b/frontend/gas_admin/README.md index e986c4d..c961ba2 100644 --- a/frontend/gas_admin/README.md +++ b/frontend/gas_admin/README.md @@ -23,5 +23,5 @@ pnpm build | 变量 | 说明 | | --- | --- | -| `VITE_API_BASE_URL` | 可选覆盖后端 API 地址;开发默认 `http://localhost:12426/heqi/gas/v1`,生产构建默认 `http://rest.heqiapp.com/heqi/gas/v1` | +| `VITE_API_BASE_URL` | 可选覆盖后端 API 地址;开发默认 `http://localhost:12426/heqi/gas/v1`,生产构建默认 `https://rest.heqiapp.com/heqi/gas/v1` | | `VITE_ERROR_REPORT_URL` | 可选的前端错误上报地址 | diff --git a/frontend/gas_admin/config/vite.config.ts b/frontend/gas_admin/config/vite.config.ts index 74dec60..842d103 100644 --- a/frontend/gas_admin/config/vite.config.ts +++ b/frontend/gas_admin/config/vite.config.ts @@ -32,7 +32,7 @@ export default defineConfig(({ command, mode }) => { const env = loadEnv(mode, process.cwd(), ''); const apiBaseURL = env.VITE_API_BASE_URL || - `${isDev ? 'http://localhost:12426' : 'http://rest.heqiapp.com'}/heqi/gas/v1`; + `${isDev ? 'http://localhost:12426' : 'https://rest.heqiapp.com'}/heqi/gas/v1`; const plugins: PluginOption[] = [ vue(), diff --git a/frontend/platform_admin/.env.example b/frontend/platform_admin/.env.example index 44686e9..f216a71 100644 --- a/frontend/platform_admin/.env.example +++ b/frontend/platform_admin/.env.example @@ -1,4 +1,4 @@ -# 可选覆盖;开发默认 http://localhost:12426/heqi/platform/v1,生产构建默认 http://rest.heqiapp.com/heqi/platform/v1。 +# 可选覆盖;开发默认 http://localhost:12426/heqi/platform/v1,生产构建默认 https://rest.heqiapp.com/heqi/platform/v1。 VITE_API_BASE_URL= # 受保护 API 使用 BSM JWT;本地联调时由认证服务签发,不要提交真实令牌。 VITE_DEV_JWT= diff --git a/frontend/platform_admin/README.md b/frontend/platform_admin/README.md index 6cf9705..b117e02 100644 --- a/frontend/platform_admin/README.md +++ b/frontend/platform_admin/README.md @@ -36,5 +36,5 @@ pnpm build | 变量 | 说明 | | --- | --- | -| `VITE_API_BASE_URL` | 可选覆盖后端 API 地址;开发默认 `http://localhost:12426/heqi/platform/v1`,生产构建默认 `http://rest.heqiapp.com/heqi/platform/v1` | +| `VITE_API_BASE_URL` | 可选覆盖后端 API 地址;开发默认 `http://localhost:12426/heqi/platform/v1`,生产构建默认 `https://rest.heqiapp.com/heqi/platform/v1` | | `VITE_ERROR_REPORT_URL` | 可选的前端错误上报地址 | diff --git a/frontend/platform_admin/config/vite.config.ts b/frontend/platform_admin/config/vite.config.ts index e50399f..539f4e7 100644 --- a/frontend/platform_admin/config/vite.config.ts +++ b/frontend/platform_admin/config/vite.config.ts @@ -32,7 +32,7 @@ export default defineConfig(({ command, mode }) => { const env = loadEnv(mode, process.cwd(), ''); const apiBaseURL = env.VITE_API_BASE_URL || - `${isDev ? 'http://localhost:12426' : 'http://rest.heqiapp.com'}/heqi/platform/v1`; + `${isDev ? 'http://localhost:12426' : 'https://rest.heqiapp.com'}/heqi/platform/v1`; const plugins: PluginOption[] = [ vue(),