From 43b6bc739ed070e71313331291d8f75ecdf97473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=BD=AE?= Date: Tue, 28 Oct 2025 22:00:41 +0800 Subject: [PATCH] remove localhost --- README.md | 12 ++++++------ public/survey.html | 4 ++-- validate_system.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 9c46ae9..31604c6 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## 🌐 系统启动 -确保系统运行在 **http://localhost:5678** +确保系统运行在您的服务器域名 启动命令: ```bash @@ -12,7 +12,7 @@ poetry run python enhanced_server.py ## 📋 完整使用流程 ### 1️⃣ 访问测评列表页 -- **URL**: `http://localhost:5678/` +- **URL**: `http://your-server-domain/` - **功能**: 查看所有已完成的测评报告 - **操作**: - 浏览历史报告 @@ -20,7 +20,7 @@ poetry run python enhanced_server.py - 点击"开始新的测评" ### 2️⃣ 配置测评 -- **URL**: `http://localhost:5678/survey.html` +- **URL**: `http://your-server-domain/survey.html` - **功能**: 填写学员信息并配置抽题规则 - **必填信息**: - 学员姓名 @@ -31,7 +31,7 @@ poetry run python enhanced_server.py - 自定义抽题规则(JSON格式) ### 3️⃣ 开始答题 -- **URL**: 自动生成,格式为 `http://localhost:5678/quiz/{sessionId}` +- **URL**: 自动生成,格式为 `http://your-server-domain/quiz/{sessionId}` - **功能**: 完成测评题目 - **操作**: - 查看学员信息 @@ -44,7 +44,7 @@ poetry run python enhanced_server.py - **状态**: 页面会显示生成进度 ### 5️⃣ 查看测评报告 -- **URL**: `http://localhost:5678/public/report.html?id={reportId}` +- **URL**: `http://your-server-domain/public/report.html?id={reportId}` - **功能**: 查看详细的个性化测评报告 - **内容包括**: - 五维能力雷达图 @@ -106,7 +106,7 @@ JSON格式示例: ## 📱 快速开始 -1. 访问 `http://localhost:5678/` +1. 访问 `http://your-server-domain/` 2. 点击"开始新的测评" 3. 填写学员信息 4. 配置抽题规则(可选) diff --git a/public/survey.html b/public/survey.html index 9aea845..8e6b9c5 100644 --- a/public/survey.html +++ b/public/survey.html @@ -1081,7 +1081,7 @@ startBtn.disabled = true; // 调用后端API创建会话 - const response = await fetch('http://localhost:5678/api/create-session', { + const response = await fetch('/api/create-session', { method: 'POST', headers: { 'Content-Type': 'application/json' @@ -1107,7 +1107,7 @@ this.studentId = result.studentId; // 跳转到答题页面 - window.location.href = `http://localhost:5678/quiz/${result.sessionId}`; + window.location.href = `/quiz/${result.sessionId}`; } else { throw new Error('创建会话失败'); } diff --git a/validate_system.py b/validate_system.py index 4491cd3..837c367 100644 --- a/validate_system.py +++ b/validate_system.py @@ -101,7 +101,7 @@ def validate_system(): if success_count == total_count: print("\n🎉 系统完全正常!可以开始使用。") print("\n🚀 快速开始:") - print(" 1. 访问: http://localhost:5678/") + print(" 1. 访问: http://your-server-domain/") print(" 2. 点击'开始新的测评'") print(" 3. 填写信息并答题") print(" 4. 查看AI生成的报告")