good version for 算法注册

This commit is contained in:
2026-02-15 21:23:28 +08:00
parent 3c03777b97
commit 62ea5d36a5
115 changed files with 9566 additions and 1576 deletions

View File

@@ -0,0 +1,32 @@
#!/usr/bin/env python3
"""测试前端代理配置"""
import requests
def test_frontend_proxy():
"""测试前端代理"""
try:
# 测试前端代理
response = requests.get('http://localhost:3000/api/algorithms')
print(f"状态码: {response.status_code}")
if response.status_code == 200:
data = response.json()
print(f"成功获取 {len(data.get('algorithms', []))} 个算法")
# 检查第一个算法的字段
if data.get('algorithms'):
first_algo = data['algorithms'][0]
print(f"\n第一个算法:")
print(f" 名称: {first_algo.get('name')}")
print(f" 技术分类: {first_algo.get('tech_category')}")
print(f" 输出类型: {first_algo.get('output_type')}")
else:
print(f"请求失败: {response.text}")
except Exception as e:
print(f"测试失败: {e}")
if __name__ == "__main__":
test_frontend_proxy()