const axios = require('axios') const BASE_URL = 'http://localhost:5351' async function testCompletedSupervisionsSimple() { try { console.log('测试监管任务已结项API连接...') const response = await axios.get(`${BASE_URL}/api/completed-supervisions`, { timeout: 5000 }) console.log('✅ 监管任务已结项API连接成功') console.log('响应状态:', response.status) console.log('响应数据:', JSON.stringify(response.data, null, 2)) } catch (error) { if (error.response) { console.log('API响应错误:') console.log('状态码:', error.response.status) console.log('错误信息:', error.response.data) } else if (error.request) { console.log('❌ 无法连接到服务器,请确保后端服务正在运行') } else { console.log('❌ 请求配置错误:', error.message) } } } testCompletedSupervisionsSimple()