Generating commit message...

This commit is contained in:
2025-08-30 14:33:49 +08:00
parent 4d469e95f0
commit 7f9bfbb381
99 changed files with 69225 additions and 35 deletions

View File

@@ -0,0 +1,87 @@
// API基础配置
const config = {
// 开发环境
development: {
baseURL: 'http://localhost:3000/api',
timeout: 10000
},
// 生产环境
production: {
baseURL: 'https://api.jiebanke.com/api',
timeout: 15000
}
}
// 获取当前环境配置
const getConfig = () => {
const env = process.env.NODE_ENV || 'development'
return config[env]
}
// API端点
const endpoints = {
// 用户相关
USER: {
LOGIN: '/auth/login',
REGISTER: '/auth/register',
PROFILE: '/user/profile',
UPDATE_PROFILE: '/user/profile',
UPLOAD_AVATAR: '/user/avatar'
},
// 旅行计划
TRAVEL: {
LIST: '/travel/list',
DETAIL: '/travel/detail',
CREATE: '/travel/create',
JOIN: '/travel/join',
MY_PLANS: '/travel/my-plans',
SEARCH: '/travel/search'
},
// 动物认养
ANIMAL: {
LIST: '/animal/list',
DETAIL: '/animal/detail',
ADOPT: '/animal/adopt',
MY_ANIMALS: '/animal/my-animals',
CATEGORIES: '/animal/categories'
},
// 送花服务
FLOWER: {
LIST: '/flower/list',
DETAIL: '/flower/detail',
ORDER: '/flower/order',
MY_ORDERS: '/flower/my-orders',
CATEGORIES: '/flower/categories'
},
// 订单管理
ORDER: {
LIST: '/order/list',
DETAIL: '/order/detail',
CANCEL: '/order/cancel',
PAY: '/order/pay',
CONFIRM: '/order/confirm'
},
// 支付相关
PAYMENT: {
CREATE: '/payment/create',
QUERY: '/payment/query',
REFUND: '/payment/refund'
},
// 系统相关
SYSTEM: {
CONFIG: '/system/config',
NOTICE: '/system/notice',
FEEDBACK: '/system/feedback'
}
}
export default {
...getConfig(),
endpoints
}