diff --git a/src/api/groupBuy.js b/src/api/groupBuy.js index 363b52e..b9e789a 100644 --- a/src/api/groupBuy.js +++ b/src/api/groupBuy.js @@ -59,3 +59,118 @@ export const joinGroupBuy = (groupBuyId, data) => { export const deleteGroupBuy = (groupBuyId) => { return request.delete(`/api/v1/group-buy/${groupBuyId}`) } + +// ==================== 拼团类型管理接口 ==================== + +/** + * 获取拼团活动类型列表 + * @param {Object} params - 查询参数 + * @param {number} [params.page=1] - 页码 + * @param {number} [params.count=10] - 每页条数 + * @param {string} [params.key] - 关键词筛选 + * @param {number} [params.expire_time] - 过期时间筛选(时间戳) + * @param {string} [params.tag] - 标签筛选 + * @returns {Promise} 返回拼团类型列表 + */ +export const getGroupBuyTypeList = (params) => { + return request.get("/api/v1/admin/activity/group_buy/type/list", params) +} + +/** + * 获取拼团活动类型标签列表 + * @returns {Promise} 返回标签列表 + */ +export const getGroupBuyTypeTags = () => { + return request.get("/api/v1/admin/activity/group_buy/type/tags") +} + +/** + * 新增拼团活动类型 + * @param {Object} data - 类型数据 + * @param {string} data.name - 名称 + * @param {string} [data.note] - 备注 + * @param {string} data.price - 价格(分) + * @param {string} [data.renew_price] - 续费价格(分) + * @param {string} data.max_person - 拼团需要人数 + * @param {string} [data.tag] - 标签 + * @param {number} [data.expire_time] - 活动过期时间 + * @returns {Promise} 返回新增结果 + */ +export const addGroupBuyType = (data) => { + return request.post("/api/v1/admin/activity/group_buy/type/add", data,{ + + }) +} + +/** + * 修改拼团活动类型 + * @param {Object} data - 类型数据 + * @param {string} data.id - ID编号 + * @param {string} [data.name] - 名称 + * @param {string} [data.note] - 备注 + * @param {string} [data.price] - 价格(分) + * @param {string} [data.renew_price] - 续费价格(分) + * @param {string} [data.max_person] - 拼团需要人数 + * @param {string} [data.tag] - 标签 + * @param {number} [data.expire_time] - 活动过期时间 + * @returns {Promise} 返回修改结果 + */ +export const updateGroupBuyType = (data) => { + return request.post("/api/v1/admin/activity/group_buy/type/update", data) +} + +/** + * 删除拼团活动类型 + * @param {string} id - 类型ID + * @returns {Promise} 返回删除结果 + */ +export const deleteGroupBuyType = (id) => { + return request.delete("/api/v1/admin/activity/group_buy/type/delete", { params: { id } }) +} + +// ==================== 拼团队伍管理接口 ==================== + +/** + * 检查队伍列表 + * @returns {Promise} 返回队伍检查结果 + */ +export const checkGroupBuyTeams = () => { + return request.get("/api/v1/admin/activity/group_buy/check") +} + +/** + * 为队伍添加随机伪人 + * @param {string} groupBuyId - 队伍ID + * @returns {Promise} 返回添加结果 + */ +export const addRandomUser = (groupBuyId) => { + return request.post("/api/v1/admin/activity/group_buy/add_random_user", { group_buy_id: groupBuyId }) +} + +/** + * 创建随机伪人队伍 + * @param {Object} data - 队伍数据 + * @param {string} data.name - 队伍名称 + * @param {string} data.group_buy_type_id - 队伍类型ID + * @returns {Promise} 返回创建结果 + */ +export const addRandomGroup = (data) => { + return request.post("/api/v1/admin/activity/group_buy/add_random_group", data) +} + +/** + * 导出成功队伍信息 + * @returns {Promise} 返回导出数据 + */ +export const exportGroupBuyIdcInfo = () => { + return request.get("/api/v1/admin/activity/group_buy/export_idc_info") +} + +/** + * 为指定队伍下发订单 + * @param {string} groupBuyId - 队伍ID + * @returns {Promise} 返回下发结果 + */ +export const setGroupBuyOrder = (groupBuyId) => { + return request.post("/api/v1/admin/activity/group_buy/set_order", { group_buy_id: groupBuyId }) +} diff --git a/src/config/menus.js b/src/config/menus.js index adabf4f..c56db70 100644 --- a/src/config/menus.js +++ b/src/config/menus.js @@ -88,6 +88,9 @@ export const menus = [ },{ path:'/activity/groupbuy', title:'拼团活动', + },{ + path:'/activity/groupbuy-type', + title:'拼团类型' } ] }, diff --git a/src/router/index.js b/src/router/index.js index 5af0bf8..aa8142f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -337,6 +337,14 @@ const routes = [ meta: { title: '拼团活动' } + }, + { + path: '/activity/groupbuy-type', + name: 'GroupBuyType', + component: () => import('../views/activity/GroupBuyType.vue'), + meta: { + title: '拼团类型' + } } ] }, diff --git a/src/utils/request.js b/src/utils/request.js index 24ca4d3..249a052 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -94,8 +94,8 @@ class Request { } // DELETE 请求 - delete(url,data={}, config = {}) { - return this.instance.delete(url,data, config) + delete(url, config = {}) { + return this.instance.delete(url, config) } // PATCH 请求 diff --git a/src/views/activity/GroupBuyActivity.vue b/src/views/activity/GroupBuyActivity.vue index 25349d7..64ffb2a 100644 --- a/src/views/activity/GroupBuyActivity.vue +++ b/src/views/activity/GroupBuyActivity.vue @@ -2,7 +2,7 @@
- + 创建随机队伍 @@ -18,13 +18,13 @@ - + @@ -77,11 +77,15 @@ - - - 5人队 - 10人队 - + + + + + + + + + - - +
@@ -134,6 +138,7 @@ import { exportIdcInfo, setOrder } from '@/api/admin/activity' +import { getGroupBuyTypeList,getGroupBuyTypeTags } from '@/api/groupBuy' // 数据状态 const loading = ref(false) @@ -150,18 +155,67 @@ const currentMembers = ref([]) const createFormRef = ref(null) const createForm = reactive({ name: '', - groupBuyType: 0 + tag: '', + groupBuyTypeId: '' }) +const typeList = ref([]) +const tagList = ref([]) const createRules = { name: [ { required: true, message: '请输入队伍名称', trigger: 'blur' } ], - groupBuyType: [ - { required: true, message: '请选择队伍类型', trigger: 'change' } + tag: [ + { required: true, message: '请选择标签', trigger: 'change' } + ], + groupBuyTypeId: [ + { required: true, message: '请选择拼团类型', trigger: 'change' } ] } +// 获取标签列表 +const fetchTags = async () => { + try { + const res = await getGroupBuyTypeTags() + if (res.code === 200) { + tagList.value = res.data || [] + } + } catch (error) { + console.error('获取标签失败:', error) + } +} + +// 根据 tag 获取拼团类型列表 +const fetchTypeListByTag = async (tag) => { + try { + const res = await getGroupBuyTypeList({ page: 1, count: 100, tag }) + if (res.code === 200) { + typeList.value = res.data?.data || [] + } + } catch (error) { + console.error('获取拼团类型失败:', error) + } +} + +// tag 变化时获取对应的拼团类型 +const handleTagChange = (tag) => { + createForm.groupBuyTypeId = '' + typeList.value = [] + if (tag) { + fetchTypeListByTag(tag) + } +} + +// 打开创建对话框 +const openCreateDialog = () => { + createForm.name = '' + createForm.tag = '' + createForm.groupBuyTypeId = '' + typeList.value = [] + fetchTags() + showCreateDialog.value = true +} + // 获取队伍列表 const fetchGroupList = async () => { loading.value = true @@ -239,25 +293,14 @@ const handleCreate = async () => { if (valid) { createLoading.value = true try { - const res = await addRandomGroup(createForm.name, createForm.groupBuyType) + const res = await addRandomGroup({ name: createForm.name, group_buy_type_id: String(createForm.groupBuyTypeId) }) console.log('创建队伍响应:', res) if (res.data.code === 200) { - // API 返回的数据结构: - // { - // group_buy_id: "17670733070-5", - // name: "发士大夫", - // maxPerson: 5, - // createTime: "2025-12-30T13:41:47.216888773+08:00", - // users: [{...}] - // } - ElMessage.success(`创建成功!队伍ID: ${res.data.group_buy_id}`) showCreateDialog.value = false createForm.name = '' - createForm.groupBuyType = 0 - - // 刷新列表 + createForm.groupBuyTypeId = '' fetchGroupList() } else { ElMessage.error(res.message || '创建失败') diff --git a/src/views/activity/GroupBuyType.vue b/src/views/activity/GroupBuyType.vue new file mode 100644 index 0000000..6177487 --- /dev/null +++ b/src/views/activity/GroupBuyType.vue @@ -0,0 +1,226 @@ + + + + + diff --git a/商品管理API对接完成报告.md b/商品管理API对接完成报告.md deleted file mode 100644 index 2c2a0c4..0000000 --- a/商品管理API对接完成报告.md +++ /dev/null @@ -1,92 +0,0 @@ -# 商品管理 API 对接完成报告 - -## 概述 -已成功完成 `默认模块.openapi.json` 中所有商品管理相关接口的对接工作。 - -## 对接详情 - -### 1. API 接口实现 (18个接口) - -#### 商品分组管理 (6个接口) -- ✅ `GET /api/v1/admin/good/group/list` - 获取商品分组列表 -- ✅ `POST /api/v1/admin/good/group/create` - 创建商品分组 -- ✅ `POST /api/v1/admin/good/group/update` - 更新商品分组 -- ✅ `POST /api/v1/admin/good/group/disable` - 隐藏商品组 -- ✅ `POST /api/v1/admin/good/group/enable` - 启用商品组 -- ✅ `DELETE /api/v1/admin/good/group/delete` - 删除商品分组 - -#### 商品管理 (5个接口) -- ✅ `GET /api/v1/admin/good/goods/list` - 获取商品列表 -- ✅ `GET /api/v1/admin/good/goods/tag_list` - 获取商品标签列表 (新增) -- ✅ `POST /api/v1/admin/good/goods/create` - 创建商品 -- ✅ `POST /api/v1/admin/good/goods/update` - 更新商品 -- ✅ `DELETE /api/v1/admin/good/goods/delete` - 删除商品 - -#### 商品参数管理 (7个接口) -- ✅ `GET /api/v1/admin/good/spec/list` - 获取商品参数列表 -- ✅ `POST /api/v1/admin/good/spec/create` - 创建商品参数 -- ✅ `GET /api/v1/admin/good/spec/detail` - 获取商品参数详情 -- ✅ `POST /api/v1/admin/good/spec/update` - 更新商品参数 -- ✅ `DELETE /api/v1/admin/good/spec/delete` - 删除商品参数 -- ✅ `POST /api/v1/admin/good/spec/add_value` - 增加商品参数值 -- ✅ `DELETE /api/v1/admin/good/spec/delete_value` - 删除商品参数值 -- ✅ `POST /api/v1/admin/good/spec/update_value` - 更新商品参数值 - -### 2. 页面实现 - -#### ProductList.vue (商品列表管理) -- ✅ 商品列表展示与分页 -- ✅ 商品搜索与筛选 (按分组) -- ✅ 商品新增/编辑/删除 -- ✅ 批量删除功能 -- ✅ 商品参数管理 (完整的参数和参数值管理) -- ✅ 商品标签选择 (新增功能) -- ✅ 骨架屏加载效果 - -#### ProductGroup.vue (商品分组管理) -- ✅ 分组列表展示与分页 -- ✅ 分组新增/编辑/删除 -- ✅ 分组状态切换 (启用/禁用) -- ✅ 骨架屏加载效果 - -### 3. 文件修改记录 - -#### 新增文件 -- `src/api/admin/product-test.js` - API 接口测试验证文件 - -#### 修改文件 -- `src/api/admin/product.js` - 新增商品标签列表接口,修正参数接口 -- `src/views/product/ProductList.vue` - 新增商品标签功能,修复价格处理 - -### 4. 技术要点 - -#### API 接口规范 -- 所有 POST/DELETE 接口使用 `multipart/form-data` 格式 -- 更新商品参数接口使用 query 参数 -- 统一的错误处理和响应格式 - -#### 数据处理 -- 价格以分为单位存储和传输 -- 商品标签从专用接口获取 -- 完整的表单验证和数据校验 - -#### 用户体验 -- 骨架屏加载效果 -- 批量操作支持 -- 实时状态切换 -- 友好的错误提示 - -## 完成状态 - -- **接口对接完成度**: 100% (18/18) -- **页面功能完成度**: 100% -- **测试验证**: 已完成 -- **文档更新**: 已完成 - -## 使用说明 - -1. **商品分组管理**: 访问 ProductGroup.vue 页面进行分组管理 -2. **商品管理**: 访问 ProductList.vue 页面进行商品管理 -3. **参数管理**: 在商品列表页面点击"参数"按钮进行参数管理 - -所有功能已完整实现,可以直接投入使用。 \ No newline at end of file diff --git a/拼团API对接说明.md b/拼团API对接说明.md deleted file mode 100644 index f618ce1..0000000 --- a/拼团API对接说明.md +++ /dev/null @@ -1,268 +0,0 @@ -# 拼团 API 对接说明 - -## API 文件位置 -- 管理端接口:`src/api/admin/activity.js` -- 用户端接口:`src/api/groupBuy.js` - -## 管理端 API 接口(已更新) - -### 1. 获取拼团列表 ✅ 已更新 -```javascript -import { getGroupBuyList } from '@/api/admin/activity.js' - -// 调用示例 -const resp = await getGroupBuyList() - -// 接口路径:GET /api/v1/users/activity/group_buy/list - -// 实际返回数据结构: -{ - code: 200, - message: "Success", - data: { - group_buy_list: ["17670726110-5", "17670733070-5"], // 所有队伍ID - lack_group_buy_list: ["17670726110-5"], // 未满员队伍ID - success_group_buy_list: [] // 已满员队伍ID - } -} -``` - -### 2. 获取拼团队伍详情 ✅ 新增 -```javascript -import { getGroupBuyDetail } from '@/api/admin/activity.js' - -// 调用示例 -const resp = await getGroupBuyDetail('17670733070-5') - -// 接口路径:GET /api/v1/users/activity/group_buy/detail/:id - -// 实际返回数据结构: -{ - code: 200, - message: "Success", - data: { - group_buy_id: "17670733070-5", - name: "发士大夫", - maxPerson: 5, - createTime: "2025-12-30T13:41:47.216888773+08:00", - users: [{ - user_id: 0, - user_name: "", - team_leader: true, - cover: "https://...", - idc_phone: "", - idc_uid: "" - }] - } -} -``` - -### 3. 创建随机伪人队伍 ✅ 已验证 -```javascript -import { addRandomGroup } from '@/api/admin/activity.js' - -// 调用示例 -const resp = await addRandomGroup('队伍名称', 0) // 0=5人队, 1=10人队 - -// 实际返回数据结构: -{ - code: 200, - message: "Success", - data: { - group_buy_id: "17670733070-5", - name: "发士大夫", - maxPerson: 5, - createTime: "2025-12-30T13:41:47.216888773+08:00", - users: [{ - user_id: 0, - user_name: "", - team_leader: true, - cover: "https://...", - idc_phone: "", - idc_uid: "" - }] - } -} -``` - -### 4. 为队伍添加随机伪人 -```javascript -import { addRandomUser } from '@/api/admin/activity.js' - -const resp = await addRandomUser(groupBuyId) -``` - -### 5. 为指定队伍下发订单 -```javascript -import { setOrder } from '@/api/admin/activity.js' - -const resp = await setOrder(groupBuyId) -``` - -### 6. 导出成功队伍信息 -```javascript -import { exportIdcInfo } from '@/api/admin/activity.js' - -const resp = await exportIdcInfo() -// 返回 Excel 文件流 -``` - -## 用户端 API 接口 - -### 1. 创建拼团 -```javascript -import { createGroupBuy } from '@/api/groupBuy.js' - -// 调用示例 -const data = { - name: '地擦拭大', - maxPerson: 5, - cover: 'https://example.com/cover.jpg' -} - -const resp = await createGroupBuy(data) - -// 响应数据结构 -{ - code: 200, - message: "Success", - data: { - group_buy_id: "17670726110-5", - name: "地擦拭大", - maxPerson: 5, - createTime: "2025-12-30T13:30:11.918394294+08:00", - users: [{ - user_id: 0, - user_name: "", - team_leader: true, - cover: "https://...", - idc_phone: "", - idc_uid: "" - }] - } -} -``` - -### 2. 检查拼团 -```javascript -import { checkGroupBuy } from '@/api/groupBuy.js' - -// 调用示例 -const groupBuyId = "17670726110-5" -const resp = await checkGroupBuy(groupBuyId) - -// 响应数据结构 -{ - code: 200, - message: "Success", - data: "ok" -} -``` - -### 3. 获取拼团详情 -```javascript -import { getGroupBuyDetail } from '@/api/groupBuy.js' - -const resp = await getGroupBuyDetail(groupBuyId) -``` - -### 4. 获取拼团列表(用户端) -```javascript -import { getGroupBuyList } from '@/api/groupBuy.js' - -const resp = await getGroupBuyList({ page: 1, pageSize: 20 }) - -// 接口路径:GET /api/v1/users/activity/group_buy/list -``` - -### 5. 加入拼团 -```javascript -import { joinGroupBuy } from '@/api/groupBuy.js' - -const resp = await joinGroupBuy(groupBuyId, { - user_id: 123, - user_name: "张三" -}) -``` - -### 6. 删除拼团 -```javascript -import { deleteGroupBuy } from '@/api/groupBuy.js' - -const resp = await deleteGroupBuy(groupBuyId) -``` - -## 完整示例页面 -- 管理端页面:`src/views/activity/GroupBuyActivity.vue` ✅ 已存在 -- 用户端示例:`src/views/marketing/GroupBuyManage.vue` - -管理端页面包含: -- ✅ 拼团列表展示(使用正确的接口路径) -- ✅ 创建随机伪人队伍 -- ✅ 添加随机伪人 -- ✅ 下发订单功能 -- ✅ 导出成功队伍 -- ✅ 查看队伍成员 - -## 接口路径总结 - -### 管理端接口 -- `GET /api/v1/users/activity/group_buy/list` - 获取拼团列表 ✅ 返回队伍ID数组 -- `GET /api/v1/users/activity/group_buy/detail/:id` - 获取队伍详情 ✅ 新增 -- `POST /api/v1/admin/activity/group_buy/add_random_group` - 创建随机队伍 ✅ 已验证 -- `POST /api/v1/admin/activity/group_buy/add_random_user` - 添加随机伪人 -- `POST /api/v1/admin/activity/group_buy/set_order` - 下发订单 -- `GET /api/v1/admin/activity/group_buy/export_idc_info` - 导出信息 - -### 用户端接口(根据需要调整) -- `POST /api/v1/group-buy/create` - 创建拼团 -- `GET /api/v1/group-buy/check/:id` - 检查拼团 -- `GET /api/v1/group-buy/:id` - 获取拼团详情 -- `GET /api/v1/users/activity/group_buy/list` - 获取拼团列表 ✅ -- `POST /api/v1/group-buy/:id/join` - 加入拼团 -- `DELETE /api/v1/group-buy/:id` - 删除拼团 - -## 使用方法 - -### 在管理端页面使用 -```vue - -``` - -## 注意事项 - -1. **接口路径已更新**:获取拼团列表接口已更新为 `/api/v1/users/activity/group_buy/list` -2. **错误处理**:所有 API 调用都应该包含 try-catch 错误处理 -3. **响应检查**:始终检查 `resp.code === 200` 来判断请求是否成功 -4. **空值处理**:使用可选链 `?.` 和空值合并 `||` 来处理可能为空的数据 -5. **用户提示**:使用 `ElMessage` 给用户友好的提示信息 - diff --git a/拼团API测试示例.md b/拼团API测试示例.md deleted file mode 100644 index 45ef585..0000000 --- a/拼团API测试示例.md +++ /dev/null @@ -1,282 +0,0 @@ -# 拼团 API 测试示例 - -## 实际数据结构(已验证) - -### 1. 获取队伍列表 -**接口**: `GET /api/v1/users/activity/group_buy/list` - -**返回数据**: -```json -{ - "code": 200, - "message": "Success", - "data": { - "group_buy_list": ["17670726110-5"], // 所有队伍ID - "lack_group_buy_list": ["17670726110-5"], // 未满员队伍ID - "success_group_buy_list": [] // 已满员队伍ID - } -} -``` - -**数据说明**: -- `group_buy_list`: 所有队伍的 ID 列表 -- `lack_group_buy_list`: 人数不足的队伍 ID(进行中) -- `success_group_buy_list`: 已满员的队伍 ID(成功) -- 队伍 ID 格式: `时间戳-人数` (如 `17670726110-5` 表示5人队) - ---- - -### 2. 创建队伍 -**接口**: `POST /api/v1/admin/activity/group_buy/add_random_group` - -**请求参数**: -```javascript -{ - name: "发士大夫", - group_buy_type: 0 // 0=5人队, 1=10人队 -} -``` - -**返回数据**: -```json -{ - "code": 200, - "message": "Success", - "data": { - "group_buy_id": "17670733070-5", - "name": "发士大夫", - "maxPerson": 5, - "createTime": "2025-12-30T13:41:47.216888773+08:00", - "users": [{ - "user_id": 0, - "user_name": "", - "team_leader": true, - "cover": "https://oss.hostidc.net/api-server/static/files/...", - "idc_phone": "", - "idc_uid": "" - }] - } -} -``` - -**数据说明**: -- 创建成功后会自动添加一个团长(伪人) -- `team_leader: true` 表示是团长 -- 返回完整的队伍信息,包括初始成员 - ---- - -### 3. 获取队伍详情 -**接口**: `GET /api/v1/users/activity/group_buy/detail/:id` - -**返回数据**: 与创建队伍返回的数据结构相同 - ---- - -## 在代码中使用 - -### 完整流程示例 - -```vue - -``` - ---- - -## 测试步骤 - -### 步骤 1: 创建队伍 -```javascript -await addRandomGroup('测试5人队', 0) -// 返回: { group_buy_id: "xxx-5", name: "测试5人队", maxPerson: 5, users: [1个团长] } -``` - -### 步骤 2: 查看列表 -```javascript -await getGroupBuyList() -// 返回: { group_buy_list: ["xxx-5"], lack_group_buy_list: ["xxx-5"], success_group_buy_list: [] } -``` - -### 步骤 3: 添加伪人(重复4次,凑满5人) -```javascript -await addRandomUser("xxx-5") // 第2人 -await addRandomUser("xxx-5") // 第3人 -await addRandomUser("xxx-5") // 第4人 -await addRandomUser("xxx-5") // 第5人 -``` - -### 步骤 4: 再次查看列表 -```javascript -await getGroupBuyList() -// 返回: { group_buy_list: ["xxx-5"], lack_group_buy_list: [], success_group_buy_list: ["xxx-5"] } -// 注意: 队伍从 lack_group_buy_list 移到了 success_group_buy_list -``` - -### 步骤 5: 下发订单 -```javascript -await setOrder("xxx-5") -// 为满员队伍下发订单 -``` - ---- - -## 队伍状态判断逻辑 - -```javascript -const getTeamStatus = (teamId, lackList, successList) => { - if (successList.includes(teamId)) { - return 'success' // 已满员 - } else if (lackList.includes(teamId)) { - return 'pending' // 进行中(未满员) - } else { - return 'empty' // 空队伍(理论上不会出现) - } -} -``` - ---- - -## 队伍类型判断 - -根据队伍 ID 判断类型: -```javascript -const getTeamType = (teamId) => { - if (teamId.includes('-5')) { - return { type: 0, maxPerson: 5, typeName: '5人队' } - } else if (teamId.includes('-10')) { - return { type: 1, maxPerson: 10, typeName: '10人队' } - } - return { type: 0, maxPerson: 5, typeName: '未知' } -} -``` - ---- - -## 注意事项 - -1. **列表接口只返回 ID**:需要调用详情接口获取完整信息 -2. **队伍 ID 格式**:`时间戳-人数`,可以从 ID 判断队伍类型 -3. **状态判断**:通过 `lack_group_buy_list` 和 `success_group_buy_list` 判断队伍状态 -4. **创建即有团长**:创建队伍时会自动添加一个团长(伪人) -5. **满员条件**:5人队需要5人,10人队需要10人 -6. **下发订单**:只能对已满员的队伍下发订单 - ---- - -## 当前页面功能 - -`src/views/activity/GroupBuyActivity.vue` 已实现: - -✅ 获取队伍列表(显示所有队伍及状态) -✅ 创建随机伪人队伍 -✅ 添加随机伪人到队伍 -✅ 查看队伍成员详情 -✅ 为满员队伍下发订单 -✅ 导出成功队伍信息 -✅ 实时状态更新 - -所有功能都已根据实际 API 数据结构进行了适配! diff --git a/默认模块.openapi.json b/默认模块.openapi.json index fb2bd4c..f670ade 100644 --- a/默认模块.openapi.json +++ b/默认模块.openapi.json @@ -7,6 +7,336 @@ }, "tags": [], "paths": { + "/api/v1/admin/activity/group_buy/type/list": { + "get": { + "summary": "获取拼团活动类型列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "key", + "in": "query", + "description": "关键词筛选", + "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "expire_time", + "in": "query", + "description": "过期时间筛选 时间戳", + "required": false, + "example": 0, + "schema": { + "type": "integer" + } + }, + { + "name": "tag", + "in": "query", + "description": "标签筛选", + "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/group_buy/type/tags": { + "get": { + "summary": "获取拼团活动类型tag列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/group_buy/type/add": { + "post": { + "summary": "新增拼团活动类型", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + }, + "price": { + "description": "价格 /分", + "example": "", + "type": "string" + }, + "renew_price": { + "description": "续费价格 /分", + "example": "", + "type": "string" + }, + "max_person": { + "description": "拼团需要人数", + "example": "", + "type": "string" + }, + "tag": { + "description": "标签", + "example": "", + "type": "string" + }, + "expire_time": { + "description": "活动过期时间", + "example": 0, + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/group_buy/type/update": { + "post": { + "summary": "修改拼团活动类型", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "ID 编号", + "example": "", + "type": "string" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + }, + "price": { + "description": "价格 /分", + "example": "", + "type": "string" + }, + "renew_price": { + "description": "续费价格 /分", + "example": "", + "type": "string" + }, + "max_person": { + "description": "拼团需要人数", + "example": "", + "type": "string" + }, + "tag": { + "description": "标签", + "example": "", + "type": "string" + }, + "expire_time": { + "description": "活动过期时间", + "example": 0, + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/group_buy/type/delete": { + "delete": { + "summary": "删除拼团活动类型", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, "/api/v1/admin/activity/group_buy/check": { "get": { "summary": "检查队伍列表", @@ -121,8 +451,8 @@ "example": "", "type": "string" }, - "group_buy_type": { - "description": "队伍类型(0为5人队;1为10人队)", + "group_buy_type_id": { + "description": "队伍类型id", "example": "", "type": "string" }