配置 Nginx 反向代理和 Ngrok 内网穿透支持
- 添加 Nginx 反向代理配置(支持 ngrok 域名) - 创建统一的 API 工具函数(自动适配域名) - 更新前端 API 配置支持相对路径 - 配置支付宝回调地址使用 ngrok URL - 优化 Docker Compose 配置(仅暴露 80 端口) - 添加完整的部署和配置文档
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// 任务清理API服务
|
||||
import request from './request'
|
||||
import { getApiBaseURL } from '@/utils/apiHelper'
|
||||
|
||||
export const cleanupApi = {
|
||||
// 获取清理统计信息
|
||||
@@ -29,7 +30,7 @@ export const cleanupApi = {
|
||||
// 获取清理统计信息(原始fetch方式,用于测试)
|
||||
async getCleanupStatsRaw() {
|
||||
try {
|
||||
const response = await fetch('http://localhost:8080/api/cleanup/cleanup-stats')
|
||||
const response = await fetch(`${getApiBaseURL()}/cleanup/cleanup-stats`)
|
||||
if (response.ok) {
|
||||
return await response.json()
|
||||
} else {
|
||||
@@ -44,7 +45,7 @@ export const cleanupApi = {
|
||||
// 执行完整清理(原始fetch方式,用于测试)
|
||||
async performFullCleanupRaw() {
|
||||
try {
|
||||
const response = await fetch('http://localhost:8080/api/cleanup/full-cleanup', {
|
||||
const response = await fetch(`${getApiBaseURL()}/cleanup/full-cleanup`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
|
||||
Reference in New Issue
Block a user