fix: 修复API模式配置和GET请求参数问题
🐛 修复的问题: 1. 切换 dataMode 从 'mock' 改为 'api' 2. 修复所有GET请求使用 params 而不是 data - api/athlete.js: getMyAthletes, getAthletesForAdmin, getVenues, getProjects - api/score.js: getDeductions 3. 修复 utils/request.js 支持 params 参数 - GET 请求使用 params 作为查询参数 - POST/PUT/DELETE 请求使用 data 作为请求体 ✅ 现在可以正确调用后端API接口 📋 测试步骤: 1. 确保后端服务运行在 http://localhost:8080 2. 刷新小程序页面 3. 查看控制台调试信息 4. 验证接口调用 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,7 @@ export function getDeductions(params) {
|
||||
return request({
|
||||
url: '/martial/deductionItem/list',
|
||||
method: 'GET',
|
||||
data: {
|
||||
params: {
|
||||
...params,
|
||||
current: 1,
|
||||
size: 100
|
||||
|
||||
Reference in New Issue
Block a user