Files
nxxmdata/government-mini-program/config/api.js

68 lines
1.4 KiB
JavaScript
Raw Normal View History

2025-10-17 17:29:11 +08:00
// API配置文件
const config = {
// 后端服务器配置
2025-10-23 17:26:47 +08:00
baseURL: 'http://localhost:5352/api',
2025-10-17 17:29:11 +08:00
// 请求超时时间
timeout: 10000,
// API端点配置
endpoints: {
// 认证相关
auth: {
2025-10-23 17:26:47 +08:00
login: '/auth/login',
2025-10-17 17:29:11 +08:00
logout: '/auth/logout',
userInfo: '/auth/userinfo'
},
// 养殖户管理
farmer: {
list: '/government/farmers',
create: '/government/farmers',
update: '/government/farmers',
delete: '/government/farmers',
detail: '/government/farmers',
resetPassword: '/government/farmers/{id}/reset-password',
farmTypes: '/government/farm-types',
animalTypes: '/government/animal-types'
},
// 数据统计
statistics: {
dataCenter: '/government/data-center',
marketPrice: '/government/market-price'
},
// 系统管理
system: {
health: '/health'
},
// 设备管理
device: {
warnings: '/device-warning',
smartCollars: '/government/collars',
smartEarmarks: '/smart-earmark',
smartHosts: '/smart-host'
},
// 疫情管理
epidemic: {
records: '/epidemic-record',
activities: '/epidemic-activity',
vaccines: '/vaccine'
},
// 监管任务
supervision: {
tasks: '/supervision'
},
// 审批流程
approval: {
processes: '/approval-process'
}
}
};
module.exports = config;