Files
pixelheros/put/web/src/api.js
panFD 1806f4b1a5 feat(web+server): 新增枚举覆写支持与CSV导出功能
1. 新增buff_target枚举覆写配置,支持选择施法目标类型
2. 后端添加CSV导出接口,生成标准化英雄设计表
3. 前端新增CSV导出按钮,支持一键导出配置
4. 优化覆写字段渲染逻辑,支持枚举值转可读枚举名
5. 清理英雄数据中冗余的summon_count默认配置
2026-09-05 12:23:23 +08:00

13 lines
678 B
JavaScript

import axios from 'axios'
export const api = {
meta: () => axios.get('/api/meta').then((r) => r.data),
refresh: () => axios.post('/api/refresh').then((r) => r.data),
fetchHeroes: () => axios.get('/api/heroes').then((r) => r.data),
saveHeroes: (heroes) => axios.post('/api/heroes', { heroes }).then((r) => r.data),
exportHeroes: (heroes) => axios.post('/api/export', { heroes }).then((r) => r.data),
applyHeroes: (heroes) => axios.post('/api/apply', { heroes }).then((r) => r.data),
exportCsv: (heroes) => axios.post('/api/export-csv', { heroes }).then((r) => r.data),
fetchExport: () => axios.get('/api/export', { responseType: 'text' }).then((r) => r.data),
}