diff --git a/src/api/modules/invitation.js b/src/api/modules/invitation.js new file mode 100644 index 0000000..028eec7 --- /dev/null +++ b/src/api/modules/invitation.js @@ -0,0 +1,32 @@ +import instance from '../../utils/axios.js' + +// 邀请码相关API +const invitationApi = { + // 获取邀请码列表 + getInviteCodes: async (params = {}) => { + // 构造查询参数 + const queryParams = new URLSearchParams(); + + // 添加分页参数 + if (params.pageNum) queryParams.append('pageNum', params.pageNum); + if (params.pageSize) queryParams.append('pageSize', params.pageSize); + + // 添加搜索参数 + if (params.userId) queryParams.append('userId', params.userId); + if (params.phonenumber) queryParams.append('phonenumber', params.phonenumber); + + const url = `/inviteCodes/erp/getInviteCodes?${queryParams.toString()}`; + const response = await instance.get(url); + // 确保返回的数据格式正确 + console.log('API原始响应:', response); + return response; + }, + + // 根据邀请人ID获取被邀请人列表 + getInviteesByInviter: (inviterId) => { + return instance.get(`/inviteCodes/inviteRelations/inviter?inviterId=${inviterId}`) + } +}; + +// 导出API +export { invitationApi }; \ No newline at end of file diff --git a/src/layout/Sidebar.vue b/src/layout/Sidebar.vue index a960075..1d4944b 100644 --- a/src/layout/Sidebar.vue +++ b/src/layout/Sidebar.vue @@ -24,7 +24,7 @@ diff --git a/src/router/index.js b/src/router/index.js index 214c823..1441072 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -57,6 +57,11 @@ const routes = [{ path: '/invitation/list', component: () => import('@/views/Invitation/List/index.vue'), meta: { title: '邀请列表' } + }, + { + path: '/order/wechat/list', + component: () => import('@/views/order/wechat/list.vue'), + meta: { title: '订单列表' } } ] }] diff --git a/src/views/Invitation/List/index.vue b/src/views/Invitation/List/index.vue new file mode 100644 index 0000000..73e6332 --- /dev/null +++ b/src/views/Invitation/List/index.vue @@ -0,0 +1,320 @@ + + + + + \ No newline at end of file diff --git a/src/views/order/wechat/index.vue b/src/views/order/wechat/index.vue new file mode 100644 index 0000000..2dd4007 --- /dev/null +++ b/src/views/order/wechat/index.vue @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/src/views/order/wechat/list.vue b/src/views/order/wechat/list.vue new file mode 100644 index 0000000..b081301 --- /dev/null +++ b/src/views/order/wechat/list.vue @@ -0,0 +1,555 @@ + + + + + \ No newline at end of file