diff --git a/src/api/bpm/category/index.ts b/src/api/bpm/category/index.ts deleted file mode 100644 index 1854f31c..00000000 --- a/src/api/bpm/category/index.ts +++ /dev/null @@ -1,53 +0,0 @@ -import request from '@/config/axios' - -// BPM 流程分类 VO -export interface CategoryVO { - id: number // 分类编号 - name: string // 分类名 - code: string // 分类标志 - status: number // 分类状态 - sort: number // 分类排序 -} - -// BPM 流程分类 API -export const CategoryApi = { - // 查询流程分类分页 - getCategoryPage: async (params: any) => { - return await request.get({ url: `/bpm/category/page`, params }) - }, - - // 查询流程分类列表 - getCategorySimpleList: async () => { - return await request.get({ url: `/bpm/category/simple-list` }) - }, - - // 查询流程分类详情 - getCategory: async (id: number) => { - return await request.get({ url: `/bpm/category/get?id=` + id }) - }, - - // 新增流程分类 - createCategory: async (data: CategoryVO) => { - return await request.post({ url: `/bpm/category/create`, data }) - }, - - // 修改流程分类 - updateCategory: async (data: CategoryVO) => { - return await request.put({ url: `/bpm/category/update`, data }) - }, - - // 批量修改流程分类的排序 - updateCategorySortBatch: async (ids: number[]) => { - return await request.put({ - url: `/bpm/category/update-sort-batch`, - params: { - ids: ids.join(',') - } - }) - }, - - // 删除流程分类 - deleteCategory: async (id: number) => { - return await request.delete({ url: `/bpm/category/delete?id=` + id }) - } -} diff --git a/src/api/bpm/definition/index.ts b/src/api/bpm/definition/index.ts deleted file mode 100644 index caedba14..00000000 --- a/src/api/bpm/definition/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -import request from '@/config/axios' - -export const getProcessDefinition = async (id?: string, key?: string) => { - return await request.get({ - url: '/bpm/process-definition/get', - params: { id, key } - }) -} - -export const getProcessDefinitionPage = async (params) => { - return await request.get({ - url: '/bpm/process-definition/page', - params - }) -} - -export const getProcessDefinitionList = async (params) => { - return await request.get({ - url: '/bpm/process-definition/list', - params - }) -} diff --git a/src/api/bpm/form/index.ts b/src/api/bpm/form/index.ts deleted file mode 100644 index 7fce11fc..00000000 --- a/src/api/bpm/form/index.ts +++ /dev/null @@ -1,56 +0,0 @@ -import request from '@/config/axios' - -export type FormVO = { - id: number - name: string - conf: string - fields: string[] - status: number - remark: string - createTime: string -} - -// 创建工作流的表单定义 -export const createForm = async (data: FormVO) => { - return await request.post({ - url: '/bpm/form/create', - data: data - }) -} - -// 更新工作流的表单定义 -export const updateForm = async (data: FormVO) => { - return await request.put({ - url: '/bpm/form/update', - data: data - }) -} - -// 删除工作流的表单定义 -export const deleteForm = async (id: number) => { - return await request.delete({ - url: '/bpm/form/delete?id=' + id - }) -} - -// 获得工作流的表单定义 -export const getForm = async (id: number) => { - return await request.get({ - url: '/bpm/form/get?id=' + id - }) -} - -// 获得工作流的表单定义分页 -export const getFormPage = async (params) => { - return await request.get({ - url: '/bpm/form/page', - params - }) -} - -// 获得动态表单的精简列表 -export const getFormSimpleList = async () => { - return await request.get({ - url: '/bpm/form/simple-list' - }) -} diff --git a/src/api/bpm/leave/index.ts b/src/api/bpm/leave/index.ts deleted file mode 100644 index 4f374b2f..00000000 --- a/src/api/bpm/leave/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -import request from '@/config/axios' - -export type LeaveVO = { - id: number - status: number - type: number - reason: string - processInstanceId: string - startTime: string - endTime: string - createTime: string -} - -// 创建请假申请 -export const createLeave = async (data: LeaveVO) => { - return await request.post({ url: '/bpm/oa/leave/create', data: data }) -} - -// 获得请假申请 -export const getLeave = async (id: number) => { - return await request.get({ url: '/bpm/oa/leave/get?id=' + id }) -} - -// 获得请假申请分页 -export const getLeavePage = async (params: PageParam) => { - return await request.get({ url: '/bpm/oa/leave/page', params }) -} diff --git a/src/api/bpm/model/index.ts b/src/api/bpm/model/index.ts deleted file mode 100644 index 0c499dba..00000000 --- a/src/api/bpm/model/index.ts +++ /dev/null @@ -1,74 +0,0 @@ -import request from '@/config/axios' - -export type ProcessDefinitionVO = { - id: string - version: number - deploymentTIme: string - suspensionState: number - formType?: number -} - -export type ModelVO = { - id: number - formName: string - key: string - name: string - description: string - category: string - formType: number - formId: number - formCustomCreatePath: string - formCustomViewPath: string - processDefinition: ProcessDefinitionVO - status: number - remark: string - createTime: string - bpmnXml: string -} - -export const getModelList = async (name: string | undefined) => { - return await request.get({ url: '/bpm/model/list', params: { name } }) -} - -export const getModel = async (id: string) => { - return await request.get({ url: '/bpm/model/get?id=' + id }) -} - -export const updateModel = async (data: ModelVO) => { - return await request.put({ url: '/bpm/model/update', data: data }) -} - -// 批量修改流程分类的排序 -export const updateModelSortBatch = async (ids: number[]) => { - return await request.put({ - url: `/bpm/model/update-sort-batch`, - params: { - ids: ids.join(',') - } - }) -} - -export const updateModelBpmn = async (data: ModelVO) => { - return await request.put({ url: '/bpm/model/update-bpmn', data: data }) -} - -// 任务状态修改 -export const updateModelState = async (id: number, state: number) => { - const data = { - id: id, - state: state - } - return await request.put({ url: '/bpm/model/update-state', data: data }) -} - -export const createModel = async (data: ModelVO) => { - return await request.post({ url: '/bpm/model/create', data: data }) -} - -export const deleteModel = async (id: number) => { - return await request.delete({ url: '/bpm/model/delete?id=' + id }) -} - -export const deployModel = async (id: number) => { - return await request.post({ url: '/bpm/model/deploy?id=' + id }) -} diff --git a/src/api/bpm/processExpression/index.ts b/src/api/bpm/processExpression/index.ts deleted file mode 100644 index af6a7372..00000000 --- a/src/api/bpm/processExpression/index.ts +++ /dev/null @@ -1,42 +0,0 @@ -import request from '@/config/axios' - -// BPM 流程表达式 VO -export interface ProcessExpressionVO { - id: number // 编号 - name: string // 表达式名字 - status: number // 表达式状态 - expression: string // 表达式 -} - -// BPM 流程表达式 API -export const ProcessExpressionApi = { - // 查询BPM 流程表达式分页 - getProcessExpressionPage: async (params: any) => { - return await request.get({ url: `/bpm/process-expression/page`, params }) - }, - - // 查询BPM 流程表达式详情 - getProcessExpression: async (id: number) => { - return await request.get({ url: `/bpm/process-expression/get?id=` + id }) - }, - - // 新增BPM 流程表达式 - createProcessExpression: async (data: ProcessExpressionVO) => { - return await request.post({ url: `/bpm/process-expression/create`, data }) - }, - - // 修改BPM 流程表达式 - updateProcessExpression: async (data: ProcessExpressionVO) => { - return await request.put({ url: `/bpm/process-expression/update`, data }) - }, - - // 删除BPM 流程表达式 - deleteProcessExpression: async (id: number) => { - return await request.delete({ url: `/bpm/process-expression/delete?id=` + id }) - }, - - // 导出BPM 流程表达式 Excel - exportProcessExpression: async (params) => { - return await request.download({ url: `/bpm/process-expression/export-excel`, params }) - } -} \ No newline at end of file diff --git a/src/api/bpm/processInstance/index.ts b/src/api/bpm/processInstance/index.ts deleted file mode 100644 index f97270f9..00000000 --- a/src/api/bpm/processInstance/index.ts +++ /dev/null @@ -1,103 +0,0 @@ -import request from '@/config/axios' -import { ProcessDefinitionVO } from '@/api/bpm/model' -import { NodeType, CandidateStrategy } from '@/components/SimpleProcessDesignerV2/src/consts' -export type Task = { - id: string - name: string -} - -export type ProcessInstanceVO = { - id: number - name: string - processDefinitionId: string - category: string - result: number - tasks: Task[] - fields: string[] - status: number - remark: string - businessKey: string - createTime: string - endTime: string - processDefinition?: ProcessDefinitionVO -} - -// 用户信息 -export type User = { - id: number - nickname: string - avatar: string -} - -// 审批任务信息 -export type ApprovalTaskInfo = { - id: number - ownerUser: User - assigneeUser: User - status: number - reason: string -} - -// 审批节点信息 -export type ApprovalNodeInfo = { - id: number - name: string - nodeType: NodeType - candidateStrategy?: CandidateStrategy - status: number - startTime?: Date - endTime?: Date - candidateUsers?: User[] - tasks: ApprovalTaskInfo[] -} - -export const getProcessInstanceMyPage = async (params: any) => { - return await request.get({ url: '/bpm/process-instance/my-page', params }) -} - -export const getProcessInstanceManagerPage = async (params: any) => { - return await request.get({ url: '/bpm/process-instance/manager-page', params }) -} - -export const createProcessInstance = async (data) => { - return await request.post({ url: '/bpm/process-instance/create', data: data }) -} - -export const cancelProcessInstanceByStartUser = async (id: number, reason: string) => { - const data = { - id: id, - reason: reason - } - return await request.delete({ url: '/bpm/process-instance/cancel-by-start-user', data: data }) -} - -export const cancelProcessInstanceByAdmin = async (id: number, reason: string) => { - const data = { - id: id, - reason: reason - } - return await request.delete({ url: '/bpm/process-instance/cancel-by-admin', data: data }) -} - -export const getProcessInstance = async (id: string) => { - return await request.get({ url: '/bpm/process-instance/get?id=' + id }) -} - -export const getProcessInstanceCopyPage = async (params: any) => { - return await request.get({ url: '/bpm/process-instance/copy/page', params }) -} - -// 获取审批详情 -export const getApprovalDetail = async (params: any) => { - return await request.get({ url: 'bpm/process-instance/get-approval-detail' , params }) -} - -// 获取表单字段权限 -export const getFormFieldsPermission = async (params: any) => { - return await request.get({ url: '/bpm/process-instance/get-form-fields-permission', params }) -} - -// 获取流程实例的 BPMN 模型视图 -export const getProcessInstanceBpmnModelView = async (id: string) => { - return await request.get({ url: '/bpm/process-instance/get-bpmn-model-view?id=' + id }) -} diff --git a/src/api/bpm/processListener/index.ts b/src/api/bpm/processListener/index.ts deleted file mode 100644 index dabaa476..00000000 --- a/src/api/bpm/processListener/index.ts +++ /dev/null @@ -1,40 +0,0 @@ -import request from '@/config/axios' - -// BPM 流程监听器 VO -export interface ProcessListenerVO { - id: number // 编号 - name: string // 监听器名字 - type: string // 监听器类型 - status: number // 监听器状态 - event: string // 监听事件 - valueType: string // 监听器值类型 - value: string // 监听器值 -} - -// BPM 流程监听器 API -export const ProcessListenerApi = { - // 查询流程监听器分页 - getProcessListenerPage: async (params: any) => { - return await request.get({ url: `/bpm/process-listener/page`, params }) - }, - - // 查询流程监听器详情 - getProcessListener: async (id: number) => { - return await request.get({ url: `/bpm/process-listener/get?id=` + id }) - }, - - // 新增流程监听器 - createProcessListener: async (data: ProcessListenerVO) => { - return await request.post({ url: `/bpm/process-listener/create`, data }) - }, - - // 修改流程监听器 - updateProcessListener: async (data: ProcessListenerVO) => { - return await request.put({ url: `/bpm/process-listener/update`, data }) - }, - - // 删除流程监听器 - deleteProcessListener: async (id: number) => { - return await request.delete({ url: `/bpm/process-listener/delete?id=` + id }) - } -} diff --git a/src/api/bpm/simple/index.ts b/src/api/bpm/simple/index.ts deleted file mode 100644 index 6e1e995a..00000000 --- a/src/api/bpm/simple/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -import request from '@/config/axios' - - -export const updateBpmSimpleModel = async (data) => { - return await request.post({ - url: '/bpm/model/simple/update', - data: data - }) -} - -export const getBpmSimpleModel = async (id) => { - return await request.get({ - url: '/bpm/model/simple/get?id=' + id - }) -} diff --git a/src/api/bpm/task/index.ts b/src/api/bpm/task/index.ts deleted file mode 100644 index d4c10380..00000000 --- a/src/api/bpm/task/index.ts +++ /dev/null @@ -1,113 +0,0 @@ -import request from '@/config/axios' - -/** - * 任务状态枚举 - */ -export enum TaskStatusEnum { - /** - * 未开始 - */ - NOT_START = -1, - - /** - * 待审批 - */ - WAIT = 0, - /** - * 审批中 - */ - RUNNING = 1, - /** - * 审批通过 - */ - APPROVE = 2, - - /** - * 审批不通过 - */ - REJECT = 3, - - /** - * 已取消 - */ - CANCEL = 4, - /** - * 已退回 - */ - RETURN = 5, - /** - * 审批通过中 - */ - APPROVING = 7 -} - -export const getTaskTodoPage = async (params: any) => { - return await request.get({ url: '/bpm/task/todo-page', params }) -} - -export const getTaskDonePage = async (params: any) => { - return await request.get({ url: '/bpm/task/done-page', params }) -} - -export const getTaskManagerPage = async (params: any) => { - return await request.get({ url: '/bpm/task/manager-page', params }) -} - -export const approveTask = async (data: any) => { - return await request.put({ url: '/bpm/task/approve', data }) -} - -export const rejectTask = async (data: any) => { - return await request.put({ url: '/bpm/task/reject', data }) -} - -export const getTaskListByProcessInstanceId = async (processInstanceId: string) => { - return await request.get({ - url: '/bpm/task/list-by-process-instance-id?processInstanceId=' + processInstanceId - }) -} - -// 获取所有可退回的节点 -export const getTaskListByReturn = async (id: string) => { - return await request.get({ url: '/bpm/task/list-by-return', params: { id } }) -} - -// 退回 -export const returnTask = async (data: any) => { - return await request.put({ url: '/bpm/task/return', data }) -} - -// 委派 -export const delegateTask = async (data: any) => { - return await request.put({ url: '/bpm/task/delegate', data }) -} - -// 转派 -export const transferTask = async (data: any) => { - return await request.put({ url: '/bpm/task/transfer', data }) -} - -// 加签 -export const signCreateTask = async (data: any) => { - return await request.put({ url: '/bpm/task/create-sign', data }) -} - -// 减签 -export const signDeleteTask = async (data: any) => { - return await request.delete({ url: '/bpm/task/delete-sign', data }) -} - -// 抄送 -export const copyTask = async (data: any) => { - return await request.put({ url: '/bpm/task/copy', data }) -} - -// 获取我的待办任务 -export const myTodoTask = async (processInstanceId: string) => { - return await request.get({ url: '/bpm/task/my-todo?processInstanceId=' + processInstanceId }) -} - -// 获取减签任务列表 -export const getChildrenTaskList = async (id: string) => { - return await request.get({ url: '/bpm/task/list-by-parent-task-id?parentTaskId=' + id }) -} diff --git a/src/api/bpm/userGroup/index.ts b/src/api/bpm/userGroup/index.ts deleted file mode 100644 index 7d12755e..00000000 --- a/src/api/bpm/userGroup/index.ts +++ /dev/null @@ -1,47 +0,0 @@ -import request from '@/config/axios' - -export type UserGroupVO = { - id: number - name: string - description: string - userIds: number[] - status: number - remark: string - createTime: string -} - -// 创建用户组 -export const createUserGroup = async (data: UserGroupVO) => { - return await request.post({ - url: '/bpm/user-group/create', - data: data - }) -} - -// 更新用户组 -export const updateUserGroup = async (data: UserGroupVO) => { - return await request.put({ - url: '/bpm/user-group/update', - data: data - }) -} - -// 删除用户组 -export const deleteUserGroup = async (id: number) => { - return await request.delete({ url: '/bpm/user-group/delete?id=' + id }) -} - -// 获得用户组 -export const getUserGroup = async (id: number) => { - return await request.get({ url: '/bpm/user-group/get?id=' + id }) -} - -// 获得用户组分页 -export const getUserGroupPage = async (params) => { - return await request.get({ url: '/bpm/user-group/page', params }) -} - -// 获取用户组精简信息列表 -export const getUserGroupSimpleList = async (): Promise => { - return await request.get({ url: '/bpm/user-group/simple-list' }) -} diff --git a/src/api/crm/business/index.ts b/src/api/crm/business/index.ts deleted file mode 100644 index 24204255..00000000 --- a/src/api/crm/business/index.ts +++ /dev/null @@ -1,98 +0,0 @@ -import request from '@/config/axios' -import { TransferReqVO } from '@/api/crm/permission' - -export interface BusinessVO { - id: number - name: string - customerId: number - customerName?: string - followUpStatus: boolean - contactLastTime: Date - contactNextTime: Date - ownerUserId: number - ownerUserName?: string // 负责人的用户名称 - ownerUserDept?: string // 负责人的部门名称 - statusTypeId: number - statusTypeName?: string - statusId: number - statusName?: string - endStatus: number - endRemark: string - dealTime: Date - totalProductPrice: number - totalPrice: number - discountPercent: number - remark: string - creator: string // 创建人 - creatorName?: string // 创建人名称 - createTime: Date // 创建时间 - updateTime: Date // 更新时间 - products?: [ - { - id: number - productId: number - productName: string - productNo: string - productUnit: number - productPrice: number - businessPrice: number - count: number - totalPrice: number - } - ] -} - -// 查询 CRM 商机列表 -export const getBusinessPage = async (params) => { - return await request.get({ url: `/crm/business/page`, params }) -} - -// 查询 CRM 商机列表,基于指定客户 -export const getBusinessPageByCustomer = async (params) => { - return await request.get({ url: `/crm/business/page-by-customer`, params }) -} - -// 查询 CRM 商机详情 -export const getBusiness = async (id: number) => { - return await request.get({ url: `/crm/business/get?id=` + id }) -} - -// 获得 CRM 商机列表(精简) -export const getSimpleBusinessList = async () => { - return await request.get({ url: `/crm/business/simple-all-list` }) -} - -// 新增 CRM 商机 -export const createBusiness = async (data: BusinessVO) => { - return await request.post({ url: `/crm/business/create`, data }) -} - -// 修改 CRM 商机 -export const updateBusiness = async (data: BusinessVO) => { - return await request.put({ url: `/crm/business/update`, data }) -} - -// 修改 CRM 商机状态 -export const updateBusinessStatus = async (data: BusinessVO) => { - return await request.put({ url: `/crm/business/update-status`, data }) -} - -// 删除 CRM 商机 -export const deleteBusiness = async (id: number) => { - return await request.delete({ url: `/crm/business/delete?id=` + id }) -} - -// 导出 CRM 商机 Excel -export const exportBusiness = async (params) => { - return await request.download({ url: `/crm/business/export-excel`, params }) -} - -// 联系人关联商机列表 -export const getBusinessPageByContact = async (params) => { - return await request.get({ url: `/crm/business/page-by-contact`, params }) -} - -// 商机转移 -export const transferBusiness = async (data: TransferReqVO) => { - return await request.put({ url: '/crm/business/transfer', data }) -} diff --git a/src/api/crm/business/status/index.ts b/src/api/crm/business/status/index.ts deleted file mode 100644 index cddaa5a2..00000000 --- a/src/api/crm/business/status/index.ts +++ /dev/null @@ -1,68 +0,0 @@ -import request from '@/config/axios' - -export interface BusinessStatusTypeVO { - id: number - name: string - deptIds: number[] - statuses?: { - id: number - name: string - percent: number - } -} - -export const DEFAULT_STATUSES = [ - { - endStatus: 1, - key: '结束', - name: '赢单', - percent: 100 - }, - { - endStatus: 2, - key: '结束', - name: '输单', - percent: 0 - }, - { - endStatus: 3, - key: '结束', - name: '无效', - percent: 0 - } -] - -// 查询商机状态组列表 -export const getBusinessStatusPage = async (params: any) => { - return await request.get({ url: `/crm/business-status/page`, params }) -} - -// 新增商机状态组 -export const createBusinessStatus = async (data: BusinessStatusTypeVO) => { - return await request.post({ url: `/crm/business-status/create`, data }) -} - -// 修改商机状态组 -export const updateBusinessStatus = async (data: BusinessStatusTypeVO) => { - return await request.put({ url: `/crm/business-status/update`, data }) -} - -// 查询商机状态类型详情 -export const getBusinessStatus = async (id: number) => { - return await request.get({ url: `/crm/business-status/get?id=` + id }) -} - -// 删除商机状态 -export const deleteBusinessStatus = async (id: number) => { - return await request.delete({ url: `/crm/business-status/delete?id=` + id }) -} - -// 获得商机状态组列表 -export const getBusinessStatusTypeSimpleList = async () => { - return await request.get({ url: `/crm/business-status/type-simple-list` }) -} - -// 获得商机阶段列表 -export const getBusinessStatusSimpleList = async (typeId: number) => { - return await request.get({ url: `/crm/business-status/status-simple-list`, params: { typeId } }) -} diff --git a/src/api/crm/clue/index.ts b/src/api/crm/clue/index.ts deleted file mode 100644 index 9736514d..00000000 --- a/src/api/crm/clue/index.ts +++ /dev/null @@ -1,78 +0,0 @@ -import request from '@/config/axios' -import { TransferReqVO } from '@/api/crm/permission' - -export interface ClueVO { - id: number // 编号 - name: string // 线索名称 - followUpStatus: boolean // 跟进状态 - contactLastTime: Date // 最后跟进时间 - contactLastContent: string // 最后跟进内容 - contactNextTime: Date // 下次联系时间 - ownerUserId: number // 负责人的用户编号 - ownerUserName?: string // 负责人的用户名称 - ownerUserDept?: string // 负责人的部门名称 - transformStatus: boolean // 转化状态 - customerId: number // 客户编号 - customerName?: string // 客户名称 - mobile: string // 手机号 - telephone: string // 电话 - qq: string // QQ - wechat: string // wechat - email: string // email - areaId: number // 所在地 - areaName?: string // 所在地名称 - detailAddress: string // 详细地址 - industryId: number // 所属行业 - level: number // 客户等级 - source: number // 客户来源 - remark: string // 备注 - creator: string // 创建人 - creatorName?: string // 创建人名称 - createTime: Date // 创建时间 - updateTime: Date // 更新时间 -} - -// 查询线索列表 -export const getCluePage = async (params: any) => { - return await request.get({ url: `/crm/clue/page`, params }) -} - -// 查询线索详情 -export const getClue = async (id: number) => { - return await request.get({ url: `/crm/clue/get?id=` + id }) -} - -// 新增线索 -export const createClue = async (data: ClueVO) => { - return await request.post({ url: `/crm/clue/create`, data }) -} - -// 修改线索 -export const updateClue = async (data: ClueVO) => { - return await request.put({ url: `/crm/clue/update`, data }) -} - -// 删除线索 -export const deleteClue = async (id: number) => { - return await request.delete({ url: `/crm/clue/delete?id=` + id }) -} - -// 导出线索 Excel -export const exportClue = async (params) => { - return await request.download({ url: `/crm/clue/export-excel`, params }) -} - -// 线索转移 -export const transferClue = async (data: TransferReqVO) => { - return await request.put({ url: '/crm/clue/transfer', data }) -} - -// 线索转化为客户 -export const transformClue = async (id: number) => { - return await request.put({ url: '/crm/clue/transform', params: { id } }) -} - -// 获得分配给我的、待跟进的线索数量 -export const getFollowClueCount = async () => { - return await request.get({ url: '/crm/clue/follow-count' }) -} diff --git a/src/api/crm/contact/index.ts b/src/api/crm/contact/index.ts deleted file mode 100644 index 7c24dfa9..00000000 --- a/src/api/crm/contact/index.ts +++ /dev/null @@ -1,113 +0,0 @@ -import request from '@/config/axios' -import { TransferReqVO } from '@/api/crm/permission' - -export interface ContactVO { - id: number // 编号 - name: string // 联系人名称 - customerId: number // 客户编号 - customerName?: string // 客户名称 - contactLastTime: Date // 最后跟进时间 - contactLastContent: string // 最后跟进内容 - contactNextTime: Date // 下次联系时间 - ownerUserId: number // 负责人的用户编号 - ownerUserName?: string // 负责人的用户名称 - ownerUserDept?: string // 负责人的部门名称 - mobile: string // 手机号 - telephone: string // 电话 - qq: string // QQ - wechat: string // wechat - email: string // email - areaId: number // 所在地 - areaName?: string // 所在地名称 - detailAddress: string // 详细地址 - sex: number // 性别 - master: boolean // 是否主联系人 - post: string // 职务 - parentId: number // 上级联系人编号 - parentName?: string // 上级联系人名称 - remark: string // 备注 - creator: string // 创建人 - creatorName?: string // 创建人名称 - createTime: Date // 创建时间 - updateTime: Date // 更新时间 -} - -export interface ContactBusinessReqVO { - contactId: number - businessIds: number[] -} - -export interface ContactBusiness2ReqVO { - businessId: number - contactIds: number[] -} - -// 查询 CRM 联系人列表 -export const getContactPage = async (params) => { - return await request.get({ url: `/crm/contact/page`, params }) -} - -// 查询 CRM 联系人列表,基于指定客户 -export const getContactPageByCustomer = async (params: any) => { - return await request.get({ url: `/crm/contact/page-by-customer`, params }) -} - -// 查询 CRM 联系人列表,基于指定商机 -export const getContactPageByBusiness = async (params: any) => { - return await request.get({ url: `/crm/contact/page-by-business`, params }) -} - -// 查询 CRM 联系人详情 -export const getContact = async (id: number) => { - return await request.get({ url: `/crm/contact/get?id=` + id }) -} - -// 新增 CRM 联系人 -export const createContact = async (data: ContactVO) => { - return await request.post({ url: `/crm/contact/create`, data }) -} - -// 修改 CRM 联系人 -export const updateContact = async (data: ContactVO) => { - return await request.put({ url: `/crm/contact/update`, data }) -} - -// 删除 CRM 联系人 -export const deleteContact = async (id: number) => { - return await request.delete({ url: `/crm/contact/delete?id=` + id }) -} - -// 导出 CRM 联系人 Excel -export const exportContact = async (params) => { - return await request.download({ url: `/crm/contact/export-excel`, params }) -} - -// 获得 CRM 联系人列表(精简) -export const getSimpleContactList = async () => { - return await request.get({ url: `/crm/contact/simple-all-list` }) -} - -// 批量新增联系人商机关联 -export const createContactBusinessList = async (data: ContactBusinessReqVO) => { - return await request.post({ url: `/crm/contact/create-business-list`, data }) -} - -// 批量新增联系人商机关联 -export const createContactBusinessList2 = async (data: ContactBusiness2ReqVO) => { - return await request.post({ url: `/crm/contact/create-business-list2`, data }) -} - -// 解除联系人商机关联 -export const deleteContactBusinessList = async (data: ContactBusinessReqVO) => { - return await request.delete({ url: `/crm/contact/delete-business-list`, data }) -} - -// 解除联系人商机关联 -export const deleteContactBusinessList2 = async (data: ContactBusiness2ReqVO) => { - return await request.delete({ url: `/crm/contact/delete-business-list2`, data }) -} - -// 联系人转移 -export const transferContact = async (data: TransferReqVO) => { - return await request.put({ url: '/crm/contact/transfer', data }) -} diff --git a/src/api/crm/contract/config/index.ts b/src/api/crm/contract/config/index.ts deleted file mode 100644 index 0c7ad20c..00000000 --- a/src/api/crm/contract/config/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -import request from '@/config/axios' - -export interface ContractConfigVO { - notifyEnabled?: boolean - notifyDays?: number -} - -// 获取合同配置 -export const getContractConfig = async () => { - return await request.get({ url: `/crm/contract-config/get` }) -} - -// 更新合同配置 -export const saveContractConfig = async (data: ContractConfigVO) => { - return await request.put({ url: `/crm/contract-config/save`, data }) -} diff --git a/src/api/crm/contract/index.ts b/src/api/crm/contract/index.ts deleted file mode 100644 index 7028b774..00000000 --- a/src/api/crm/contract/index.ts +++ /dev/null @@ -1,114 +0,0 @@ -import request from '@/config/axios' -import { TransferReqVO } from '@/api/crm/permission' - -export interface ContractVO { - id: number - name: string - no: string - customerId: number - customerName?: string - businessId: number - businessName: string - contactLastTime: Date - ownerUserId: number - ownerUserName?: string - ownerUserDeptName?: string - processInstanceId: number - auditStatus: number - orderDate: Date - startTime: Date - endTime: Date - totalProductPrice: number - discountPercent: number - totalPrice: number - totalReceivablePrice: number - signContactId: number - signContactName?: string - signUserId: number - signUserName: string - remark: string - createTime?: Date - creator: string - creatorName: string - updateTime?: Date - products?: [ - { - id: number - productId: number - productName: string - productNo: string - productUnit: number - productPrice: number - contractPrice: number - count: number - totalPrice: number - } - ] -} - -// 查询 CRM 合同列表 -export const getContractPage = async (params) => { - return await request.get({ url: `/crm/contract/page`, params }) -} - -// 查询 CRM 联系人列表,基于指定客户 -export const getContractPageByCustomer = async (params: any) => { - return await request.get({ url: `/crm/contract/page-by-customer`, params }) -} - -// 查询 CRM 联系人列表,基于指定商机 -export const getContractPageByBusiness = async (params: any) => { - return await request.get({ url: `/crm/contract/page-by-business`, params }) -} - -// 查询 CRM 合同详情 -export const getContract = async (id: number) => { - return await request.get({ url: `/crm/contract/get?id=` + id }) -} - -// 查询 CRM 合同下拉列表 -export const getContractSimpleList = async (customerId: number) => { - return await request.get({ - url: `/crm/contract/simple-list?customerId=${customerId}` - }) -} - -// 新增 CRM 合同 -export const createContract = async (data: ContractVO) => { - return await request.post({ url: `/crm/contract/create`, data }) -} - -// 修改 CRM 合同 -export const updateContract = async (data: ContractVO) => { - return await request.put({ url: `/crm/contract/update`, data }) -} - -// 删除 CRM 合同 -export const deleteContract = async (id: number) => { - return await request.delete({ url: `/crm/contract/delete?id=` + id }) -} - -// 导出 CRM 合同 Excel -export const exportContract = async (params) => { - return await request.download({ url: `/crm/contract/export-excel`, params }) -} - -// 提交审核 -export const submitContract = async (id: number) => { - return await request.put({ url: `/crm/contract/submit?id=${id}` }) -} - -// 合同转移 -export const transferContract = async (data: TransferReqVO) => { - return await request.put({ url: '/crm/contract/transfer', data }) -} - -// 获得待审核合同数量 -export const getAuditContractCount = async () => { - return await request.get({ url: '/crm/contract/audit-count' }) -} - -// 获得即将到期(提醒)的合同数量 -export const getRemindContractCount = async () => { - return await request.get({ url: '/crm/contract/remind-count' }) -} diff --git a/src/api/crm/followup/index.ts b/src/api/crm/followup/index.ts deleted file mode 100644 index 414f3f71..00000000 --- a/src/api/crm/followup/index.ts +++ /dev/null @@ -1,43 +0,0 @@ -import request from '@/config/axios' - -// 跟进记录 VO -export interface FollowUpRecordVO { - id: number // 编号 - bizType: number // 数据类型 - bizId: number // 数据编号 - type: number // 跟进类型 - content: string // 跟进内容 - picUrls: string[] // 图片 - fileUrls: string[] // 附件 - nextTime: Date // 下次联系时间 - businessIds: number[] // 关联的商机编号数组 - businesses: { - id: number - name: string - }[] // 关联的商机数组 - contactIds: number[] // 关联的联系人编号数组 - contacts: { - id: number - name: string - }[] // 关联的联系人数组 - creator: string - creatorName?: string -} - -// 跟进记录 API -export const FollowUpRecordApi = { - // 查询跟进记录分页 - getFollowUpRecordPage: async (params: any) => { - return await request.get({ url: `/crm/follow-up-record/page`, params }) - }, - - // 新增跟进记录 - createFollowUpRecord: async (data: FollowUpRecordVO) => { - return await request.post({ url: `/crm/follow-up-record/create`, data }) - }, - - // 删除跟进记录 - deleteFollowUpRecord: async (id: number) => { - return await request.delete({ url: `/crm/follow-up-record/delete?id=` + id }) - } -} diff --git a/src/api/crm/operateLog/index.ts b/src/api/crm/operateLog/index.ts deleted file mode 100644 index d0f25b6b..00000000 --- a/src/api/crm/operateLog/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -import request from '@/config/axios' - -export interface OperateLogVO extends PageParam { - bizType: number - bizId: number -} - -// 获得操作日志 -export const getOperateLogPage = async (params: OperateLogVO) => { - return await request.get({ url: `/crm/operate-log/page`, params }) -} diff --git a/src/api/crm/permission/index.ts b/src/api/crm/permission/index.ts deleted file mode 100644 index 4f88b14f..00000000 --- a/src/api/crm/permission/index.ts +++ /dev/null @@ -1,72 +0,0 @@ -import request from '@/config/axios' - -export interface PermissionVO { - id?: number // 数据权限编号 - userId: number // 用户编号 - bizType: number // Crm 类型 - bizId: number // Crm 类型数据编号 - level: number // 权限级别 - toBizTypes?: number[] // 同时添加至 - deptName?: string // 部门名称 - nickname?: string // 用户昵称 - postNames?: string[] // 岗位名称数组 - createTime?: Date - ids?: number[] -} - -export interface TransferReqVO { - id: number // 模块编号 - newOwnerUserId: number // 新负责人的用户编号 - oldOwnerPermissionLevel?: number // 老负责人加入团队后的权限级别 - toBizTypes?: number[] // 转移客户时,需要额外有【联系人】【商机】【合同】的 checkbox 选择 -} - -/** - * CRM 业务类型枚举 - * - * @author HUIHUI - */ -export enum BizTypeEnum { - CRM_CLUE = 1, // 线索 - CRM_CUSTOMER = 2, // 客户 - CRM_CONTACT = 3, // 联系人 - CRM_BUSINESS = 4, // 商机 - CRM_CONTRACT = 5, // 合同 - CRM_PRODUCT = 6, // 产品 - CRM_RECEIVABLE = 7, // 回款 - CRM_RECEIVABLE_PLAN = 8 // 回款计划 -} - -/** - * CRM 数据权限级别枚举 - */ -export enum PermissionLevelEnum { - OWNER = 1, // 负责人 - READ = 2, // 只读 - WRITE = 3 // 读写 -} - -// 获得数据权限列表(查询团队成员列表) -export const getPermissionList = async (params) => { - return await request.get({ url: `/crm/permission/list`, params }) -} - -// 创建数据权限(新增团队成员) -export const createPermission = async (data: PermissionVO) => { - return await request.post({ url: `/crm/permission/create`, data }) -} - -// 编辑数据权限(修改团队成员权限级别) -export const updatePermission = async (data) => { - return await request.put({ url: `/crm/permission/update`, data }) -} - -// 删除数据权限(删除团队成员) -export const deletePermissionBatch = async (val: number[]) => { - return await request.delete({ url: '/crm/permission/delete?ids=' + val.join(',') }) -} - -// 删除自己的数据权限(退出团队) -export const deleteSelfPermission = async (id: number) => { - return await request.delete({ url: '/crm/permission/delete-self?id=' + id }) -} diff --git a/src/api/crm/product/category/index.ts b/src/api/crm/product/category/index.ts deleted file mode 100644 index 6341d1bc..00000000 --- a/src/api/crm/product/category/index.ts +++ /dev/null @@ -1,33 +0,0 @@ -import request from '@/config/axios' - -// TODO @zange:挪到 product 下,建个 category 包,挪进去哈; -export interface ProductCategoryVO { - id: number - name: string - parentId: number -} - -// 查询产品分类详情 -export const getProductCategory = async (id: number) => { - return await request.get({ url: `/crm/product-category/get?id=` + id }) -} - -// 新增产品分类 -export const createProductCategory = async (data: ProductCategoryVO) => { - return await request.post({ url: `/crm/product-category/create`, data }) -} - -// 修改产品分类 -export const updateProductCategory = async (data: ProductCategoryVO) => { - return await request.put({ url: `/crm/product-category/update`, data }) -} - -// 删除产品分类 -export const deleteProductCategory = async (id: number) => { - return await request.delete({ url: `/crm/product-category/delete?id=` + id }) -} - -// 产品分类列表 -export const getProductCategoryList = async (params) => { - return await request.get({ url: `/crm/product-category/list`, params }) -} diff --git a/src/api/crm/product/index.ts b/src/api/crm/product/index.ts deleted file mode 100644 index f0c23289..00000000 --- a/src/api/crm/product/index.ts +++ /dev/null @@ -1,49 +0,0 @@ -import request from '@/config/axios' - -export interface ProductVO { - id: number - name: string - no: string - unit: number - price: number - status: number - categoryId: number - categoryName?: string - description: string - ownerUserId: number -} - -// 查询产品列表 -export const getProductPage = async (params) => { - return await request.get({ url: `/crm/product/page`, params }) -} - -// 获得产品精简列表 -export const getProductSimpleList = async () => { - return await request.get({ url: `/crm/product/simple-list` }) -} - -// 查询产品详情 -export const getProduct = async (id: number) => { - return await request.get({ url: `/crm/product/get?id=` + id }) -} - -// 新增产品 -export const createProduct = async (data: ProductVO) => { - return await request.post({ url: `/crm/product/create`, data }) -} - -// 修改产品 -export const updateProduct = async (data: ProductVO) => { - return await request.put({ url: `/crm/product/update`, data }) -} - -// 删除产品 -export const deleteProduct = async (id: number) => { - return await request.delete({ url: `/crm/product/delete?id=` + id }) -} - -// 导出产品 Excel -export const exportProduct = async (params) => { - return await request.download({ url: `/crm/product/export-excel`, params }) -} diff --git a/src/api/crm/receivable/index.ts b/src/api/crm/receivable/index.ts deleted file mode 100644 index 32ecd25a..00000000 --- a/src/api/crm/receivable/index.ts +++ /dev/null @@ -1,73 +0,0 @@ -import request from '@/config/axios' - -export interface ReceivableVO { - id: number - no: string - planId?: number - customerId?: number - customerName?: string - contractId?: number - contract?: { - id?: number - name?: string - no: string - totalPrice: number - } - auditStatus: number - processInstanceId: number - returnTime: Date - returnType: number - price: number - ownerUserId: number - ownerUserName?: string - remark: string - creator: string // 创建人 - creatorName?: string // 创建人名称 - createTime: Date // 创建时间 - updateTime: Date // 更新时间 -} - -// 查询回款列表 -export const getReceivablePage = async (params) => { - return await request.get({ url: `/crm/receivable/page`, params }) -} - -// 查询回款列表 -export const getReceivablePageByCustomer = async (params) => { - return await request.get({ url: `/crm/receivable/page-by-customer`, params }) -} - -// 查询回款详情 -export const getReceivable = async (id: number) => { - return await request.get({ url: `/crm/receivable/get?id=` + id }) -} - -// 新增回款 -export const createReceivable = async (data: ReceivableVO) => { - return await request.post({ url: `/crm/receivable/create`, data }) -} - -// 修改回款 -export const updateReceivable = async (data: ReceivableVO) => { - return await request.put({ url: `/crm/receivable/update`, data }) -} - -// 删除回款 -export const deleteReceivable = async (id: number) => { - return await request.delete({ url: `/crm/receivable/delete?id=` + id }) -} - -// 导出回款 Excel -export const exportReceivable = async (params) => { - return await request.download({ url: `/crm/receivable/export-excel`, params }) -} - -// 提交审核 -export const submitReceivable = async (id: number) => { - return await request.put({ url: `/crm/receivable/submit?id=${id}` }) -} - -// 获得待审核回款数量 -export const getAuditReceivableCount = async () => { - return await request.get({ url: '/crm/receivable/audit-count' }) -} diff --git a/src/api/crm/receivable/plan/index.ts b/src/api/crm/receivable/plan/index.ts deleted file mode 100644 index 770b3477..00000000 --- a/src/api/crm/receivable/plan/index.ts +++ /dev/null @@ -1,74 +0,0 @@ -import request from '@/config/axios' - -export interface ReceivablePlanVO { - id: number - period: number - receivableId: number - price: number - returnTime: Date - remindDays: number - returnType: number - remindTime: Date - customerId: number - customerName?: string - contractId?: number - contractNo?: string - ownerUserId: number - ownerUserName?: string - remark: string - creator: string // 创建人 - creatorName?: string // 创建人名称 - createTime: Date // 创建时间 - updateTime: Date // 更新时间 - receivable?: { - price: number - returnTime: Date - } -} - -// 查询回款计划列表 -export const getReceivablePlanPage = async (params) => { - return await request.get({ url: `/crm/receivable-plan/page`, params }) -} - -// 查询回款计划列表 -export const getReceivablePlanPageByCustomer = async (params) => { - return await request.get({ url: `/crm/receivable-plan/page-by-customer`, params }) -} - -// 查询回款计划详情 -export const getReceivablePlan = async (id: number) => { - return await request.get({ url: `/crm/receivable-plan/get?id=` + id }) -} - -// 查询回款计划下拉数据 -export const getReceivablePlanSimpleList = async (customerId: number, contractId: number) => { - return await request.get({ - url: `/crm/receivable-plan/simple-list?customerId=${customerId}&contractId=${contractId}` - }) -} - -// 新增回款计划 -export const createReceivablePlan = async (data: ReceivablePlanVO) => { - return await request.post({ url: `/crm/receivable-plan/create`, data }) -} - -// 修改回款计划 -export const updateReceivablePlan = async (data: ReceivablePlanVO) => { - return await request.put({ url: `/crm/receivable-plan/update`, data }) -} - -// 删除回款计划 -export const deleteReceivablePlan = async (id: number) => { - return await request.delete({ url: `/crm/receivable-plan/delete?id=` + id }) -} - -// 导出回款计划 Excel -export const exportReceivablePlan = async (params) => { - return await request.download({ url: `/crm/receivable-plan/export-excel`, params }) -} - -// 获得待回款提醒数量 -export const getReceivablePlanRemindCount = async () => { - return await request.get({ url: '/crm/receivable-plan/remind-count' }) -} diff --git a/src/api/crm/statistics/customer.ts b/src/api/crm/statistics/customer.ts deleted file mode 100644 index c2092e48..00000000 --- a/src/api/crm/statistics/customer.ts +++ /dev/null @@ -1,168 +0,0 @@ -import request from '@/config/axios' - -export interface CrmStatisticsCustomerSummaryByDateRespVO { - time: string - customerCreateCount: number - customerDealCount: number -} - -export interface CrmStatisticsCustomerSummaryByUserRespVO { - ownerUserName: string - customerCreateCount: number - customerDealCount: number - contractPrice: number - receivablePrice: number -} - -export interface CrmStatisticsFollowUpSummaryByDateRespVO { - time: string - followUpRecordCount: number - followUpCustomerCount: number -} - -export interface CrmStatisticsFollowUpSummaryByUserRespVO { - ownerUserName: string - followupRecordCount: number - followupCustomerCount: number -} - -export interface CrmStatisticsFollowUpSummaryByTypeRespVO { - followUpType: string - followUpRecordCount: number -} - -export interface CrmStatisticsCustomerContractSummaryRespVO { - customerName: string - contractName: string - totalPrice: number - receivablePrice: number - customerType: string - customerSource: string - ownerUserName: string - creatorUserName: string - createTime: Date - orderDate: Date -} - -export interface CrmStatisticsPoolSummaryByDateRespVO { - time: string - customerPutCount: number - customerTakeCount: number -} - -export interface CrmStatisticsPoolSummaryByUserRespVO { - ownerUserName: string - customerPutCount: number - customerTakeCount: number -} - -export interface CrmStatisticsCustomerDealCycleByDateRespVO { - time: string - customerDealCycle: number -} - -export interface CrmStatisticsCustomerDealCycleByUserRespVO { - ownerUserName: string - customerDealCycle: number - customerDealCount: number -} - -export interface CrmStatisticsCustomerDealCycleByAreaRespVO { - areaName: string - customerDealCycle: number - customerDealCount: number -} - -export interface CrmStatisticsCustomerDealCycleByProductRespVO { - productName: string - customerDealCycle: number - customerDealCount: number -} - -// 客户分析 API -export const StatisticsCustomerApi = { - // 1.1 客户总量分析(按日期) - getCustomerSummaryByDate: (params: any) => { - return request.get({ - url: '/crm/statistics-customer/get-customer-summary-by-date', - params - }) - }, - // 1.2 客户总量分析(按用户) - getCustomerSummaryByUser: (params: any) => { - return request.get({ - url: '/crm/statistics-customer/get-customer-summary-by-user', - params - }) - }, - // 2.1 客户跟进次数分析(按日期) - getFollowUpSummaryByDate: (params: any) => { - return request.get({ - url: '/crm/statistics-customer/get-follow-up-summary-by-date', - params - }) - }, - // 2.2 客户跟进次数分析(按用户) - getFollowUpSummaryByUser: (params: any) => { - return request.get({ - url: '/crm/statistics-customer/get-follow-up-summary-by-user', - params - }) - }, - // 3.1 获取客户跟进方式统计数 - getFollowUpSummaryByType: (params: any) => { - return request.get({ - url: '/crm/statistics-customer/get-follow-up-summary-by-type', - params - }) - }, - // 4.1 合同摘要信息(客户转化率页面) - getContractSummary: (params: any) => { - return request.get({ - url: '/crm/statistics-customer/get-contract-summary', - params - }) - }, - // 5.1 获取客户公海分析(按日期) - getPoolSummaryByDate: (param: any) => { - return request.get({ - url: '/crm/statistics-customer/get-pool-summary-by-date', - params: param - }) - }, - // 5.2 获取客户公海分析(按用户) - getPoolSummaryByUser: (param: any) => { - return request.get({ - url: '/crm/statistics-customer/get-pool-summary-by-user', - params: param - }) - }, - // 6.1 获取客户成交周期(按日期) - getCustomerDealCycleByDate: (params: any) => { - return request.get({ - url: '/crm/statistics-customer/get-customer-deal-cycle-by-date', - params - }) - }, - // 6.2 获取客户成交周期(按用户) - getCustomerDealCycleByUser: (params: any) => { - return request.get({ - url: '/crm/statistics-customer/get-customer-deal-cycle-by-user', - params - }) - }, - // 6.2 获取客户成交周期(按用户) - getCustomerDealCycleByArea: (params: any) => { - return request.get({ - url: '/crm/statistics-customer/get-customer-deal-cycle-by-area', - params - }) - }, - // 6.2 获取客户成交周期(按用户) - getCustomerDealCycleByProduct: (params: any) => { - return request.get({ - url: '/crm/statistics-customer/get-customer-deal-cycle-by-product', - params - }) - } -} diff --git a/src/api/crm/statistics/funnel.ts b/src/api/crm/statistics/funnel.ts deleted file mode 100644 index 574a5f4f..00000000 --- a/src/api/crm/statistics/funnel.ts +++ /dev/null @@ -1,58 +0,0 @@ -import request from '@/config/axios' - -export interface CrmStatisticFunnelRespVO { - customerCount: number // 客户数 - businessCount: number // 商机数 - businessWinCount: number // 赢单数 -} - -export interface CrmStatisticsBusinessSummaryByDateRespVO { - time: string // 时间 - businessCreateCount: number // 商机数 - totalPrice: number | string // 商机金额 -} - -export interface CrmStatisticsBusinessInversionRateSummaryByDateRespVO { - time: string // 时间 - businessCount: number // 商机数量 - businessWinCount: number // 赢单商机数 -} - -// 客户分析 API -export const StatisticFunnelApi = { - // 1. 获取销售漏斗统计数据 - getFunnelSummary: (params: any) => { - return request.get({ - url: '/crm/statistics-funnel/get-funnel-summary', - params - }) - }, - // 2. 获取商机结束状态统计 - getBusinessSummaryByEndStatus: (params: any) => { - return request.get({ - url: '/crm/statistics-funnel/get-business-summary-by-end-status', - params - }) - }, - // 3. 获取新增商机分析(按日期) - getBusinessSummaryByDate: (params: any) => { - return request.get({ - url: '/crm/statistics-funnel/get-business-summary-by-date', - params - }) - }, - // 4. 获取商机转化率分析(按日期) - getBusinessInversionRateSummaryByDate: (params: any) => { - return request.get({ - url: '/crm/statistics-funnel/get-business-inversion-rate-summary-by-date', - params - }) - }, - // 5. 获取商机列表(按日期) - getBusinessPageByDate: (params: any) => { - return request.get({ - url: '/crm/statistics-funnel/get-business-page-by-date', - params - }) - } -} diff --git a/src/api/crm/statistics/performance.ts b/src/api/crm/statistics/performance.ts deleted file mode 100644 index 2318505e..00000000 --- a/src/api/crm/statistics/performance.ts +++ /dev/null @@ -1,33 +0,0 @@ -import request from '@/config/axios' - -export interface StatisticsPerformanceRespVO { - time: string - currentMonthCount: number - lastMonthCount: number - lastYearCount: number -} - -// 排行 API -export const StatisticsPerformanceApi = { - // 员工获得合同金额统计 - getContractPricePerformance: (params: any) => { - return request.get({ - url: '/crm/statistics-performance/get-contract-price-performance', - params - }) - }, - // 员工获得回款统计 - getReceivablePricePerformance: (params: any) => { - return request.get({ - url: '/crm/statistics-performance/get-receivable-price-performance', - params - }) - }, - //员工获得签约合同数量统计 - getContractCountPerformance: (params: any) => { - return request.get({ - url: '/crm/statistics-performance/get-contract-count-performance', - params - }) - } -} diff --git a/src/api/crm/statistics/portrait.ts b/src/api/crm/statistics/portrait.ts deleted file mode 100644 index c7a25725..00000000 --- a/src/api/crm/statistics/portrait.ts +++ /dev/null @@ -1,60 +0,0 @@ -import request from '@/config/axios' - -export interface CrmStatisticCustomerBaseRespVO { - customerCount: number - dealCount: number - dealPortion: string | number -} - -export interface CrmStatisticCustomerIndustryRespVO extends CrmStatisticCustomerBaseRespVO { - industryId: number - industryPortion: string | number -} - -export interface CrmStatisticCustomerSourceRespVO extends CrmStatisticCustomerBaseRespVO { - source: number - sourcePortion: string | number -} - -export interface CrmStatisticCustomerLevelRespVO extends CrmStatisticCustomerBaseRespVO { - level: number - levelPortion: string | number -} - -export interface CrmStatisticCustomerAreaRespVO extends CrmStatisticCustomerBaseRespVO { - areaId: number - areaName: string - areaPortion: string | number -} - -// 客户分析 API -export const StatisticsPortraitApi = { - // 1. 获取客户行业统计数据 - getCustomerIndustry: (params: any) => { - return request.get({ - url: '/crm/statistics-portrait/get-customer-industry-summary', - params - }) - }, - // 2. 获取客户来源统计数据 - getCustomerSource: (params: any) => { - return request.get({ - url: '/crm/statistics-portrait/get-customer-source-summary', - params - }) - }, - // 3. 获取客户级别统计数据 - getCustomerLevel: (params: any) => { - return request.get({ - url: '/crm/statistics-portrait/get-customer-level-summary', - params - }) - }, - // 4. 获取客户地区统计数据 - getCustomerArea: (params: any) => { - return request.get({ - url: '/crm/statistics-portrait/get-customer-area-summary', - params - }) - } -} diff --git a/src/api/crm/statistics/rank.ts b/src/api/crm/statistics/rank.ts deleted file mode 100644 index a9b355e0..00000000 --- a/src/api/crm/statistics/rank.ts +++ /dev/null @@ -1,67 +0,0 @@ -import request from '@/config/axios' - -export interface StatisticsRankRespVO { - count: number - nickname: string - deptName: string -} - -// 排行 API -export const StatisticsRankApi = { - // 获得合同排行榜 - getContractPriceRank: (params: any) => { - return request.get({ - url: '/crm/statistics-rank/get-contract-price-rank', - params - }) - }, - // 获得回款排行榜 - getReceivablePriceRank: (params: any) => { - return request.get({ - url: '/crm/statistics-rank/get-receivable-price-rank', - params - }) - }, - // 签约合同排行 - getContractCountRank: (params: any) => { - return request.get({ - url: '/crm/statistics-rank/get-contract-count-rank', - params - }) - }, - // 产品销量排行 - getProductSalesRank: (params: any) => { - return request.get({ - url: '/crm/statistics-rank/get-product-sales-rank', - params - }) - }, - // 新增客户数排行 - getCustomerCountRank: (params: any) => { - return request.get({ - url: '/crm/statistics-rank/get-customer-count-rank', - params - }) - }, - // 新增联系人数排行 - getContactsCountRank: (params: any) => { - return request.get({ - url: '/crm/statistics-rank/get-contacts-count-rank', - params - }) - }, - // 跟进次数排行 - getFollowCountRank: (params: any) => { - return request.get({ - url: '/crm/statistics-rank/get-follow-count-rank', - params - }) - }, - // 跟进客户数排行 - getFollowCustomerCountRank: (params: any) => { - return request.get({ - url: '/crm/statistics-rank/get-follow-customer-count-rank', - params - }) - } -} diff --git a/src/api/mall/market/banner/index.ts b/src/api/mall/market/banner/index.ts deleted file mode 100644 index ee65024c..00000000 --- a/src/api/mall/market/banner/index.ts +++ /dev/null @@ -1,37 +0,0 @@ -import request from '@/config/axios' - -export interface BannerVO { - id: number - title: string - picUrl: string - status: number - url: string - position: number - sort: number - memo: string -} - -// 查询Banner管理列表 -export const getBannerPage = async (params) => { - return await request.get({ url: `/promotion/banner/page`, params }) -} - -// 查询Banner管理详情 -export const getBanner = async (id: number) => { - return await request.get({ url: `/promotion/banner/get?id=` + id }) -} - -// 新增Banner管理 -export const createBanner = async (data: BannerVO) => { - return await request.post({ url: `/promotion/banner/create`, data }) -} - -// 修改Banner管理 -export const updateBanner = async (data: BannerVO) => { - return await request.put({ url: `/promotion/banner/update`, data }) -} - -// 删除Banner管理 -export const deleteBanner = async (id: number) => { - return await request.delete({ url: `/promotion/banner/delete?id=` + id }) -} diff --git a/src/api/mall/product/brand.ts b/src/api/mall/product/brand.ts deleted file mode 100644 index 94d53704..00000000 --- a/src/api/mall/product/brand.ts +++ /dev/null @@ -1,61 +0,0 @@ -import request from '@/config/axios' - -/** - * 商品品牌 - */ -export interface BrandVO { - /** - * 品牌编号 - */ - id?: number - /** - * 品牌名称 - */ - name: string - /** - * 品牌图片 - */ - picUrl: string - /** - * 品牌排序 - */ - sort?: number - /** - * 品牌描述 - */ - description?: string - /** - * 开启状态 - */ - status: number -} - -// 创建商品品牌 -export const createBrand = (data: BrandVO) => { - return request.post({ url: '/product/brand/create', data }) -} - -// 更新商品品牌 -export const updateBrand = (data: BrandVO) => { - return request.put({ url: '/product/brand/update', data }) -} - -// 删除商品品牌 -export const deleteBrand = (id: number) => { - return request.delete({ url: `/product/brand/delete?id=${id}` }) -} - -// 获得商品品牌 -export const getBrand = (id: number) => { - return request.get({ url: `/product/brand/get?id=${id}` }) -} - -// 获得商品品牌列表 -export const getBrandParam = (params: PageParam) => { - return request.get({ url: '/product/brand/page', params }) -} - -// 获得商品品牌精简信息列表 -export const getSimpleBrandList = () => { - return request.get({ url: '/product/brand/list-all-simple' }) -} diff --git a/src/api/mall/product/category.ts b/src/api/mall/product/category.ts deleted file mode 100644 index 7e80b76a..00000000 --- a/src/api/mall/product/category.ts +++ /dev/null @@ -1,56 +0,0 @@ -import request from '@/config/axios' - -/** - * 产品分类 - */ -export interface CategoryVO { - /** - * 分类编号 - */ - id?: number - /** - * 父分类编号 - */ - parentId?: number - /** - * 分类名称 - */ - name: string - /** - * 移动端分类图 - */ - picUrl: string - /** - * 分类排序 - */ - sort: number - /** - * 开启状态 - */ - status: number -} - -// 创建商品分类 -export const createCategory = (data: CategoryVO) => { - return request.post({ url: '/product/category/create', data }) -} - -// 更新商品分类 -export const updateCategory = (data: CategoryVO) => { - return request.put({ url: '/product/category/update', data }) -} - -// 删除商品分类 -export const deleteCategory = (id: number) => { - return request.delete({ url: `/product/category/delete?id=${id}` }) -} - -// 获得商品分类 -export const getCategory = (id: number) => { - return request.get({ url: `/product/category/get?id=${id}` }) -} - -// 获得商品分类列表 -export const getCategoryList = (params: any) => { - return request.get({ url: '/product/category/list', params }) -} diff --git a/src/api/mall/product/comment.ts b/src/api/mall/product/comment.ts deleted file mode 100644 index defdbb93..00000000 --- a/src/api/mall/product/comment.ts +++ /dev/null @@ -1,49 +0,0 @@ -import request from '@/config/axios' - -export interface CommentVO { - id: number - userId: number - userNickname: string - userAvatar: string - anonymous: boolean - orderId: number - orderItemId: number - spuId: number - spuName: string - skuId: number - visible: boolean - scores: number - descriptionScores: number - benefitScores: number - content: string - picUrls: string - replyStatus: boolean - replyUserId: number - replyContent: string - replyTime: Date -} - -// 查询商品评论列表 -export const getCommentPage = async (params) => { - return await request.get({ url: `/product/comment/page`, params }) -} - -// 查询商品评论详情 -export const getComment = async (id: number) => { - return await request.get({ url: `/product/comment/get?id=` + id }) -} - -// 添加自评 -export const createComment = async (data: CommentVO) => { - return await request.post({ url: `/product/comment/create`, data }) -} - -// 显示 / 隐藏评论 -export const updateCommentVisible = async (data: any) => { - return await request.put({ url: `/product/comment/update-visible`, data }) -} - -// 商家回复 -export const replyComment = async (data: any) => { - return await request.put({ url: `/product/comment/reply`, data }) -} diff --git a/src/api/mall/product/favorite.ts b/src/api/mall/product/favorite.ts deleted file mode 100644 index 3834eed0..00000000 --- a/src/api/mall/product/favorite.ts +++ /dev/null @@ -1,12 +0,0 @@ -import request from '@/config/axios' - -export interface Favorite { - id?: number - userId?: string // 用户编号 - spuId?: number | null // 商品 SPU 编号 -} - -// 获得 ProductFavorite 列表 -export const getFavoritePage = (params: PageParam) => { - return request.get({ url: '/product/favorite/page', params }) -} diff --git a/src/api/mall/product/history.ts b/src/api/mall/product/history.ts deleted file mode 100644 index 0aa45bd8..00000000 --- a/src/api/mall/product/history.ts +++ /dev/null @@ -1,10 +0,0 @@ -import request from '@/config/axios' - -/** - * 获得商品浏览记录分页 - * - * @param params 请求参数 - */ -export const getBrowseHistoryPage = (params: any) => { - return request.get({ url: '/product/browse-history/page', params }) -} diff --git a/src/api/mall/product/property.ts b/src/api/mall/product/property.ts deleted file mode 100644 index a191d82e..00000000 --- a/src/api/mall/product/property.ts +++ /dev/null @@ -1,89 +0,0 @@ -import request from '@/config/axios' - -/** - * 商品属性 - */ -export interface PropertyVO { - id?: number - /** 名称 */ - name: string - /** 备注 */ - remark?: string -} - -/** - * 属性值 - */ -export interface PropertyValueVO { - id?: number - /** 属性项的编号 */ - propertyId?: number - /** 名称 */ - name: string - /** 备注 */ - remark?: string -} - -// ------------------------ 属性项 ------------------- - -// 创建属性项 -export const createProperty = (data: PropertyVO) => { - return request.post({ url: '/product/property/create', data }) -} - -// 更新属性项 -export const updateProperty = (data: PropertyVO) => { - return request.put({ url: '/product/property/update', data }) -} - -// 删除属性项 -export const deleteProperty = (id: number) => { - return request.delete({ url: `/product/property/delete?id=${id}` }) -} - -// 获得属性项 -export const getProperty = (id: number): Promise => { - return request.get({ url: `/product/property/get?id=${id}` }) -} - -// 获得属性项分页 -export const getPropertyPage = (params: PageParam) => { - return request.get({ url: '/product/property/page', params }) -} - -// 获得属性项精简列表 -export const getPropertySimpleList = (): Promise => { - return request.get({ url: '/product/property/simple-list' }) -} - -// ------------------------ 属性值 ------------------- - -// 获得属性值分页 -export const getPropertyValuePage = (params: PageParam & any) => { - return request.get({ url: '/product/property/value/page', params }) -} - -// 获得属性值 -export const getPropertyValue = (id: number): Promise => { - return request.get({ url: `/product/property/value/get?id=${id}` }) -} - -// 创建属性值 -export const createPropertyValue = (data: PropertyValueVO) => { - return request.post({ url: '/product/property/value/create', data }) -} - -// 更新属性值 -export const updatePropertyValue = (data: PropertyValueVO) => { - return request.put({ url: '/product/property/value/update', data }) -} - -// 删除属性值 -export const deletePropertyValue = (id: number) => { - return request.delete({ url: `/product/property/value/delete?id=${id}` }) -} - -// 获得属性值精简列表 -export const getPropertyValueSimpleList = (propertyId: number): Promise => { - return request.get({ url: '/product/property/value/simple-list', params: { propertyId } }) -} diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts deleted file mode 100644 index d44c0f64..00000000 --- a/src/api/mall/product/spu.ts +++ /dev/null @@ -1,111 +0,0 @@ -import request from '@/config/axios' - -export interface Property { - propertyId?: number // 属性编号 - propertyName?: string // 属性名称 - valueId?: number // 属性值编号 - valueName?: string // 属性值名称 -} - -export interface Sku { - id?: number // 商品 SKU 编号 - name?: string // 商品 SKU 名称 - spuId?: number // SPU 编号 - properties?: Property[] // 属性数组 - price?: number | string // 商品价格 - marketPrice?: number | string // 市场价 - costPrice?: number | string // 成本价 - barCode?: string // 商品条码 - picUrl?: string // 图片地址 - stock?: number // 库存 - weight?: number // 商品重量,单位:kg 千克 - volume?: number // 商品体积,单位:m^3 平米 - firstBrokeragePrice?: number | string // 一级分销的佣金 - secondBrokeragePrice?: number | string // 二级分销的佣金 - salesCount?: number // 商品销量 -} - -export interface GiveCouponTemplate { - id?: number - name?: string // 优惠券名称 -} - -export interface Spu { - id?: number - name?: string // 商品名称 - categoryId?: number // 商品分类 - keyword?: string // 关键字 - unit?: number | undefined // 单位 - picUrl?: string // 商品封面图 - sliderPicUrls?: string[] // 商品轮播图 - introduction?: string // 商品简介 - deliveryTypes?: number[] // 配送方式 - deliveryTemplateId?: number | undefined // 运费模版 - brandId?: number // 商品品牌编号 - specType?: boolean // 商品规格 - subCommissionType?: boolean // 分销类型 - skus?: Sku[] // sku数组 - description?: string // 商品详情 - sort?: number // 商品排序 - giveIntegral?: number // 赠送积分 - virtualSalesCount?: number // 虚拟销量 - price?: number // 商品价格 - combinationPrice?: number // 商品拼团价格 - seckillPrice?: number // 商品秒杀价格 - salesCount?: number // 商品销量 - marketPrice?: number // 市场价 - costPrice?: number // 成本价 - stock?: number // 商品库存 - createTime?: Date // 商品创建时间 - status?: number // 商品状态 -} - -// 获得 Spu 列表 -export const getSpuPage = (params: PageParam) => { - return request.get({ url: '/product/spu/page', params }) -} - -// 获得 Spu 列表 tabsCount -export const getTabsCount = () => { - return request.get({ url: '/product/spu/get-count' }) -} - -// 创建商品 Spu -export const createSpu = (data: Spu) => { - return request.post({ url: '/product/spu/create', data }) -} - -// 更新商品 Spu -export const updateSpu = (data: Spu) => { - return request.put({ url: '/product/spu/update', data }) -} - -// 更新商品 Spu status -export const updateStatus = (data: { id: number; status: number }) => { - return request.put({ url: '/product/spu/update-status', data }) -} - -// 获得商品 Spu -export const getSpu = (id: number) => { - return request.get({ url: `/product/spu/get-detail?id=${id}` }) -} - -// 获得商品 Spu 详情列表 -export const getSpuDetailList = (ids: number[]) => { - return request.get({ url: `/product/spu/list?spuIds=${ids}` }) -} - -// 删除商品 Spu -export const deleteSpu = (id: number) => { - return request.delete({ url: `/product/spu/delete?id=${id}` }) -} - -// 导出商品 Spu Excel -export const exportSpu = async (params) => { - return await request.download({ url: '/product/spu/export', params }) -} - -// 获得商品 SPU 精简列表 -export const getSpuSimpleList = async () => { - return request.get({ url: '/product/spu/list-all-simple' }) -} diff --git a/src/api/mall/promotion/article/index.ts b/src/api/mall/promotion/article/index.ts deleted file mode 100644 index 9184c7af..00000000 --- a/src/api/mall/promotion/article/index.ts +++ /dev/null @@ -1,42 +0,0 @@ -import request from '@/config/axios' - -export interface ArticleVO { - id: number - categoryId: number - title: string - author: string - picUrl: string - introduction: string - browseCount: string - sort: number - status: number - spuId: number - recommendHot: boolean - recommendBanner: boolean - content: string -} - -// 查询文章管理列表 -export const getArticlePage = async (params: any) => { - return await request.get({ url: `/promotion/article/page`, params }) -} - -// 查询文章管理详情 -export const getArticle = async (id: number) => { - return await request.get({ url: `/promotion/article/get?id=` + id }) -} - -// 新增文章管理 -export const createArticle = async (data: ArticleVO) => { - return await request.post({ url: `/promotion/article/create`, data }) -} - -// 修改文章管理 -export const updateArticle = async (data: ArticleVO) => { - return await request.put({ url: `/promotion/article/update`, data }) -} - -// 删除文章管理 -export const deleteArticle = async (id: number) => { - return await request.delete({ url: `/promotion/article/delete?id=` + id }) -} diff --git a/src/api/mall/promotion/articleCategory/index.ts b/src/api/mall/promotion/articleCategory/index.ts deleted file mode 100644 index 47f5e934..00000000 --- a/src/api/mall/promotion/articleCategory/index.ts +++ /dev/null @@ -1,39 +0,0 @@ -import request from '@/config/axios' - -export interface ArticleCategoryVO { - id: number - name: string - picUrl: string - status: number - sort: number -} - -// 查询文章分类列表 -export const getArticleCategoryPage = async (params) => { - return await request.get({ url: `/promotion/article-category/page`, params }) -} - -// 查询文章分类精简信息列表 -export const getSimpleArticleCategoryList = async () => { - return await request.get({ url: `/promotion/article-category/list-all-simple` }) -} - -// 查询文章分类详情 -export const getArticleCategory = async (id: number) => { - return await request.get({ url: `/promotion/article-category/get?id=` + id }) -} - -// 新增文章分类 -export const createArticleCategory = async (data: ArticleCategoryVO) => { - return await request.post({ url: `/promotion/article-category/create`, data }) -} - -// 修改文章分类 -export const updateArticleCategory = async (data: ArticleCategoryVO) => { - return await request.put({ url: `/promotion/article-category/update`, data }) -} - -// 删除文章分类 -export const deleteArticleCategory = async (id: number) => { - return await request.delete({ url: `/promotion/article-category/delete?id=` + id }) -} diff --git a/src/api/mall/promotion/bargain/bargainActivity.ts b/src/api/mall/promotion/bargain/bargainActivity.ts deleted file mode 100644 index 9ad219ac..00000000 --- a/src/api/mall/promotion/bargain/bargainActivity.ts +++ /dev/null @@ -1,68 +0,0 @@ -import request from '@/config/axios' -import { Sku, Spu } from '@/api/mall/product/spu' - -export interface BargainActivityVO { - id?: number - name?: string - startTime?: Date - endTime?: Date - status?: number - helpMaxCount?: number // 达到该人数,才能砍到低价 - bargainCount?: number // 最大帮砍次数 - totalLimitCount?: number // 最大购买次数 - spuId: number - skuId: number - bargainFirstPrice: number // 砍价起始价格,单位分 - bargainMinPrice: number // 砍价底价 - stock: number // 活动库存 - randomMinPrice?: number // 用户每次砍价的最小金额,单位:分 - randomMaxPrice?: number // 用户每次砍价的最大金额,单位:分 -} - -// 砍价活动所需属性。选择的商品和属性的时候使用方便使用活动的通用封装 -export interface BargainProductVO { - spuId: number - skuId: number - bargainFirstPrice: number // 砍价起始价格,单位分 - bargainMinPrice: number // 砍价底价 - stock: number // 活动库存 -} - -// 扩展 Sku 配置 -export type SkuExtension = Sku & { - productConfig: BargainProductVO -} - -export interface SpuExtension extends Spu { - skus: SkuExtension[] // 重写类型 -} - -// 查询砍价活动列表 -export const getBargainActivityPage = async (params: any) => { - return await request.get({ url: '/promotion/bargain-activity/page', params }) -} - -// 查询砍价活动详情 -export const getBargainActivity = async (id: number) => { - return await request.get({ url: '/promotion/bargain-activity/get?id=' + id }) -} - -// 新增砍价活动 -export const createBargainActivity = async (data: BargainActivityVO) => { - return await request.post({ url: '/promotion/bargain-activity/create', data }) -} - -// 修改砍价活动 -export const updateBargainActivity = async (data: BargainActivityVO) => { - return await request.put({ url: '/promotion/bargain-activity/update', data }) -} - -// 关闭砍价活动 -export const closeBargainActivity = async (id: number) => { - return await request.put({ url: '/promotion/bargain-activity/close?id=' + id }) -} - -// 删除砍价活动 -export const deleteBargainActivity = async (id: number) => { - return await request.delete({ url: '/promotion/bargain-activity/delete?id=' + id }) -} diff --git a/src/api/mall/promotion/bargain/bargainHelp.ts b/src/api/mall/promotion/bargain/bargainHelp.ts deleted file mode 100644 index 4308ae66..00000000 --- a/src/api/mall/promotion/bargain/bargainHelp.ts +++ /dev/null @@ -1,14 +0,0 @@ -import request from '@/config/axios' - -export interface BargainHelpVO { - id: number - record: number - userId: number - reducePrice: number - endTime: Date -} - -// 查询砍价记录列表 -export const getBargainHelpPage = async (params) => { - return await request.get({ url: `/promotion/bargain-help/page`, params }) -} diff --git a/src/api/mall/promotion/bargain/bargainRecord.ts b/src/api/mall/promotion/bargain/bargainRecord.ts deleted file mode 100644 index f90b7845..00000000 --- a/src/api/mall/promotion/bargain/bargainRecord.ts +++ /dev/null @@ -1,19 +0,0 @@ -import request from '@/config/axios' - -export interface BargainRecordVO { - id: number - activityId: number - userId: number - spuId: number - skuId: number - bargainFirstPrice: number - bargainPrice: number - status: number - orderId: number - endTime: Date -} - -// 查询砍价记录列表 -export const getBargainRecordPage = async (params) => { - return await request.get({ url: `/promotion/bargain-record/page`, params }) -} diff --git a/src/api/mall/promotion/combination/combinationActivity.ts b/src/api/mall/promotion/combination/combinationActivity.ts deleted file mode 100644 index 64002672..00000000 --- a/src/api/mall/promotion/combination/combinationActivity.ts +++ /dev/null @@ -1,72 +0,0 @@ -import request from '@/config/axios' -import { Sku, Spu } from '@/api/mall/product/spu' - -export interface CombinationActivityVO { - id?: number - name?: string - spuId?: number - totalLimitCount?: number - singleLimitCount?: number - startTime?: Date - endTime?: Date - userSize?: number - totalCount?: number - successCount?: number - orderUserCount?: number - virtualGroup?: number - status?: number - limitDuration?: number - combinationPrice?: number - products: CombinationProductVO[] -} - -// 拼团活动所需属性 -export interface CombinationProductVO { - spuId: number - skuId: number - combinationPrice: number // 拼团价格 -} - -// 扩展 Sku 配置 -export type SkuExtension = Sku & { - productConfig: CombinationProductVO -} - -export interface SpuExtension extends Spu { - skus: SkuExtension[] // 重写类型 -} - -// 查询拼团活动列表 -export const getCombinationActivityPage = async (params: any) => { - return await request.get({ url: '/promotion/combination-activity/page', params }) -} - -// 查询拼团活动详情 -export const getCombinationActivity = async (id: number) => { - return await request.get({ url: '/promotion/combination-activity/get?id=' + id }) -} - -// 获得拼团活动列表,基于活动编号数组 -export const getCombinationActivityListByIds = (ids: number[]) => { - return request.get({ url: `/promotion/combination-activity/list-by-ids?ids=${ids}` }) -} - -// 新增拼团活动 -export const createCombinationActivity = async (data: CombinationActivityVO) => { - return await request.post({ url: '/promotion/combination-activity/create', data }) -} - -// 修改拼团活动 -export const updateCombinationActivity = async (data: CombinationActivityVO) => { - return await request.put({ url: '/promotion/combination-activity/update', data }) -} - -// 关闭拼团活动 -export const closeCombinationActivity = async (id: number) => { - return await request.put({ url: '/promotion/combination-activity/close?id=' + id }) -} - -// 删除拼团活动 -export const deleteCombinationActivity = async (id: number) => { - return await request.delete({ url: '/promotion/combination-activity/delete?id=' + id }) -} diff --git a/src/api/mall/promotion/combination/combinationRecord.ts b/src/api/mall/promotion/combination/combinationRecord.ts deleted file mode 100644 index b2b7d75f..00000000 --- a/src/api/mall/promotion/combination/combinationRecord.ts +++ /dev/null @@ -1,28 +0,0 @@ -import request from '@/config/axios' - -export interface CombinationRecordVO { - id: number // 拼团记录编号 - activityId: number // 拼团活动编号 - nickname: string // 用户昵称 - avatar: string // 用户头像 - headId: number // 团长编号 - expireTime: string // 过期时间 - userSize: number // 可参团人数 - userCount: number // 已参团人数 - status: number // 拼团状态 - spuName: string // 商品名字 - picUrl: string // 商品图片 - virtualGroup: boolean // 是否虚拟成团 - startTime: string // 开始时间 (订单付款后开始的时间) - endTime: string // 结束时间(成团时间/失败时间) -} - -// 查询拼团记录列表 -export const getCombinationRecordPage = async (params: any) => { - return await request.get({ url: '/promotion/combination-record/page', params }) -} - -// 获得拼团记录的概要信息 -export const getCombinationRecordSummary = async () => { - return await request.get({ url: '/promotion/combination-record/get-summary' }) -} diff --git a/src/api/mall/promotion/coupon/coupon.ts b/src/api/mall/promotion/coupon/coupon.ts deleted file mode 100755 index 2ebff5da..00000000 --- a/src/api/mall/promotion/coupon/coupon.ts +++ /dev/null @@ -1,26 +0,0 @@ -import request from '@/config/axios' - -// TODO @dhb52:vo 缺少 - -// 删除优惠劵 -export const deleteCoupon = async (id: number) => { - return request.delete({ - url: `/promotion/coupon/delete?id=${id}` - }) -} - -// 获得优惠劵分页 -export const getCouponPage = async (params: PageParam) => { - return request.get({ - url: '/promotion/coupon/page', - params: params - }) -} - -// 发送优惠券 -export const sendCoupon = async (data: any) => { - return request.post({ - url: '/promotion/coupon/send', - data: data - }) -} diff --git a/src/api/mall/promotion/coupon/couponTemplate.ts b/src/api/mall/promotion/coupon/couponTemplate.ts deleted file mode 100755 index 7e0a68c7..00000000 --- a/src/api/mall/promotion/coupon/couponTemplate.ts +++ /dev/null @@ -1,90 +0,0 @@ -import request from '@/config/axios' - -export interface CouponTemplateVO { - id: number - name: string - status: number - totalCount: number - takeLimitCount: number - takeType: number - usePrice: number - productScope: number - productScopeValues: number[] - validityType: number - validStartTime: Date - validEndTime: Date - fixedStartTerm: number - fixedEndTerm: number - discountType: number - discountPercent: number - discountPrice: number - discountLimitPrice: number - takeCount: number - useCount: number -} - -// 创建优惠劵模板 -export function createCouponTemplate(data: CouponTemplateVO) { - return request.post({ - url: '/promotion/coupon-template/create', - data: data - }) -} - -// 更新优惠劵模板 -export function updateCouponTemplate(data: CouponTemplateVO) { - return request.put({ - url: '/promotion/coupon-template/update', - data: data - }) -} - -// 更新优惠劵模板的状态 -export function updateCouponTemplateStatus(id: number, status: [0, 1]) { - const data = { - id, - status - } - return request.put({ - url: '/promotion/coupon-template/update-status', - data: data - }) -} - -// 删除优惠劵模板 -export function deleteCouponTemplate(id: number) { - return request.delete({ - url: '/promotion/coupon-template/delete?id=' + id - }) -} - -// 获得优惠劵模板 -export function getCouponTemplate(id: number) { - return request.get({ - url: '/promotion/coupon-template/get?id=' + id - }) -} - -// 获得优惠劵模板分页 -export function getCouponTemplatePage(params: PageParam) { - return request.get({ - url: '/promotion/coupon-template/page', - params: params - }) -} - -// 获得优惠劵模板分页 -export function getCouponTemplateList(ids: number[]): Promise { - return request.get({ - url: `/promotion/coupon-template/list?ids=${ids}` - }) -} - -// 导出优惠劵模板 Excel -export function exportCouponTemplateExcel(params: PageParam) { - return request.get({ - url: '/promotion/coupon-template/export-excel', - params: params, - responseType: 'blob' - }) -} diff --git a/src/api/mall/promotion/discount/discountActivity.ts b/src/api/mall/promotion/discount/discountActivity.ts deleted file mode 100644 index e755c1bd..00000000 --- a/src/api/mall/promotion/discount/discountActivity.ts +++ /dev/null @@ -1,60 +0,0 @@ -import request from '@/config/axios' -import { Sku, Spu } from '@/api/mall/product/spu' - -export interface DiscountActivityVO { - id?: number - spuId?: number - name?: string - status?: number - remark?: string - startTime?: Date - endTime?: Date - products?: DiscountProductVO[] -} -// 限时折扣相关 属性 -export interface DiscountProductVO { - spuId: number - skuId: number - discountType: number - discountPercent: number - discountPrice: number -} - -// 扩展 Sku 配置 -export type SkuExtension = Sku & { - productConfig: DiscountProductVO -} - -export interface SpuExtension extends Spu { - skus: SkuExtension[] // 重写类型 -} - -// 查询限时折扣活动列表 -export const getDiscountActivityPage = async (params) => { - return await request.get({ url: '/promotion/discount-activity/page', params }) -} - -// 查询限时折扣活动详情 -export const getDiscountActivity = async (id: number) => { - return await request.get({ url: '/promotion/discount-activity/get?id=' + id }) -} - -// 新增限时折扣活动 -export const createDiscountActivity = async (data: DiscountActivityVO) => { - return await request.post({ url: '/promotion/discount-activity/create', data }) -} - -// 修改限时折扣活动 -export const updateDiscountActivity = async (data: DiscountActivityVO) => { - return await request.put({ url: '/promotion/discount-activity/update', data }) -} - -// 关闭限时折扣活动 -export const closeDiscountActivity = async (id: number) => { - return await request.put({ url: '/promotion/discount-activity/close?id=' + id }) -} - -// 删除限时折扣活动 -export const deleteDiscountActivity = async (id: number) => { - return await request.delete({ url: '/promotion/discount-activity/delete?id=' + id }) -} diff --git a/src/api/mall/promotion/diy/page.ts b/src/api/mall/promotion/diy/page.ts deleted file mode 100644 index a834b240..00000000 --- a/src/api/mall/promotion/diy/page.ts +++ /dev/null @@ -1,45 +0,0 @@ -import request from '@/config/axios' - -export interface DiyPageVO { - id?: number - templateId?: number - name: string - remark: string - previewPicUrls: string[] - property: string -} - -// 查询装修页面列表 -export const getDiyPagePage = async (params: any) => { - return await request.get({ url: `/promotion/diy-page/page`, params }) -} - -// 查询装修页面详情 -export const getDiyPage = async (id: number) => { - return await request.get({ url: `/promotion/diy-page/get?id=` + id }) -} - -// 新增装修页面 -export const createDiyPage = async (data: DiyPageVO) => { - return await request.post({ url: `/promotion/diy-page/create`, data }) -} - -// 修改装修页面 -export const updateDiyPage = async (data: DiyPageVO) => { - return await request.put({ url: `/promotion/diy-page/update`, data }) -} - -// 删除装修页面 -export const deleteDiyPage = async (id: number) => { - return await request.delete({ url: `/promotion/diy-page/delete?id=` + id }) -} - -// 获得装修页面属性 -export const getDiyPageProperty = async (id: number) => { - return await request.get({ url: `/promotion/diy-page/get-property?id=` + id }) -} - -// 更新装修页面属性 -export const updateDiyPageProperty = async (data: DiyPageVO) => { - return await request.put({ url: `/promotion/diy-page/update-property`, data }) -} diff --git a/src/api/mall/promotion/diy/template.ts b/src/api/mall/promotion/diy/template.ts deleted file mode 100644 index 87134c95..00000000 --- a/src/api/mall/promotion/diy/template.ts +++ /dev/null @@ -1,58 +0,0 @@ -import request from '@/config/axios' -import { DiyPageVO } from '@/api/mall/promotion/diy/page' - -export interface DiyTemplateVO { - id?: number - name: string - used: boolean - usedTime?: Date - remark: string - previewPicUrls: string[] - property: string -} - -export interface DiyTemplatePropertyVO extends DiyTemplateVO { - pages: DiyPageVO[] -} - -// 查询装修模板列表 -export const getDiyTemplatePage = async (params: any) => { - return await request.get({ url: `/promotion/diy-template/page`, params }) -} - -// 查询装修模板详情 -export const getDiyTemplate = async (id: number) => { - return await request.get({ url: `/promotion/diy-template/get?id=` + id }) -} - -// 新增装修模板 -export const createDiyTemplate = async (data: DiyTemplateVO) => { - return await request.post({ url: `/promotion/diy-template/create`, data }) -} - -// 修改装修模板 -export const updateDiyTemplate = async (data: DiyTemplateVO) => { - return await request.put({ url: `/promotion/diy-template/update`, data }) -} - -// 删除装修模板 -export const deleteDiyTemplate = async (id: number) => { - return await request.delete({ url: `/promotion/diy-template/delete?id=` + id }) -} - -// 使用装修模板 -export const useDiyTemplate = async (id: number) => { - return await request.put({ url: `/promotion/diy-template/use?id=` + id }) -} - -// 获得装修模板属性 -export const getDiyTemplateProperty = async (id: number) => { - return await request.get({ - url: `/promotion/diy-template/get-property?id=` + id - }) -} - -// 更新装修模板属性 -export const updateDiyTemplateProperty = async (data: DiyTemplateVO) => { - return await request.put({ url: `/promotion/diy-template/update-property`, data }) -} diff --git a/src/api/mall/promotion/kefu/conversation/index.ts b/src/api/mall/promotion/kefu/conversation/index.ts deleted file mode 100644 index eb6eb9c9..00000000 --- a/src/api/mall/promotion/kefu/conversation/index.ts +++ /dev/null @@ -1,39 +0,0 @@ -import request from '@/config/axios' - -export interface KeFuConversationRespVO { - id: number // 编号 - userId: number // 会话所属用户 - userAvatar: string // 会话所属用户头像 - userNickname: string // 会话所属用户昵称 - lastMessageTime: Date // 最后聊天时间 - lastMessageContent: string // 最后聊天内容 - lastMessageContentType: number // 最后发送的消息类型 - adminPinned: boolean // 管理端置顶 - userDeleted: boolean // 用户是否可见 - adminDeleted: boolean // 管理员是否可见 - adminUnreadMessageCount: number // 管理员未读消息数 - createTime?: string // 创建时间 -} - -// 客服会话 API -export const KeFuConversationApi = { - // 获得客服会话列表 - getConversationList: async () => { - return await request.get({ url: '/promotion/kefu-conversation/list' }) - }, - // 获得客服会话 - getConversation: async (id: number) => { - return await request.get({ url: `/promotion/kefu-conversation/get?id=` + id }) - }, - // 客服会话置顶 - updateConversationPinned: async (data: any) => { - return await request.put({ - url: '/promotion/kefu-conversation/update-conversation-pinned', - data - }) - }, - // 删除客服会话 - deleteConversation: async (id: number) => { - return await request.delete({ url: `/promotion/kefu-conversation/delete?id=${id}` }) - } -} diff --git a/src/api/mall/promotion/kefu/message/index.ts b/src/api/mall/promotion/kefu/message/index.ts deleted file mode 100644 index 4c3bed88..00000000 --- a/src/api/mall/promotion/kefu/message/index.ts +++ /dev/null @@ -1,36 +0,0 @@ -import request from '@/config/axios' - -export interface KeFuMessageRespVO { - id: number // 编号 - conversationId: number // 会话编号 - senderId: number // 发送人编号 - senderAvatar: string // 发送人头像 - senderType: number // 发送人类型 - receiverId: number // 接收人编号 - receiverType: number // 接收人类型 - contentType: number // 消息类型 - content: string // 消息 - readStatus: boolean // 是否已读 - createTime: Date // 创建时间 -} - -// 客服会话 API -export const KeFuMessageApi = { - // 发送客服消息 - sendKeFuMessage: async (data: any) => { - return await request.post({ - url: '/promotion/kefu-message/send', - data - }) - }, - // 更新客服消息已读状态 - updateKeFuMessageReadStatus: async (conversationId: number) => { - return await request.put({ - url: '/promotion/kefu-message/update-read-status?conversationId=' + conversationId - }) - }, - // 获得消息列表(流式加载) - getKeFuMessageList: async (params: any) => { - return await request.get({ url: '/promotion/kefu-message/list', params }) - } -} diff --git a/src/api/mall/promotion/point/index.ts b/src/api/mall/promotion/point/index.ts deleted file mode 100644 index 38254c2d..00000000 --- a/src/api/mall/promotion/point/index.ts +++ /dev/null @@ -1,91 +0,0 @@ -import request from '@/config/axios' -import { Sku, Spu } from '@/api/mall/product/spu' // 积分商城活动 VO - -// 积分商城活动 VO -export interface PointActivityVO { - id: number // 积分商城活动编号 - spuId: number // 积分商城活动商品 - status: number // 活动状态 - stock: number // 积分商城活动库存 - totalStock: number // 积分商城活动总库存 - remark?: string // 备注 - sort: number // 排序 - createTime: string // 创建时间 - products: PointProductVO[] // 积分商城商品 - - // ========== 商品字段 ========== - spuName: string // 商品名称 - picUrl: string // 商品主图 - marketPrice: number // 商品市场价,单位:分 - - //======================= 显示所需兑换积分最少的 sku 信息 ======================= - point: number // 兑换积分 - price: number // 兑换金额,单位:分 -} - -// 秒杀活动所需属性 -export interface PointProductVO { - id?: number // 积分商城商品编号 - activityId?: number // 积分商城活动 id - spuId?: number // 商品 SPU 编号 - skuId: number // 商品 SKU 编号 - count: number // 可兑换数量 - point: number // 兑换积分 - price: number // 兑换金额,单位:分 - stock: number // 积分商城商品库存 - activityStatus?: number // 积分商城商品状态 -} - -// 扩展 Sku 配置 -export type SkuExtension = Sku & { - productConfig: PointProductVO -} - -export interface SpuExtension extends Spu { - skus: SkuExtension[] // 重写类型 -} - -export interface SpuExtension0 extends Spu { - pointStock: number // 积分商城活动库存 - pointTotalStock: number // 积分商城活动总库存 - point: number // 兑换积分 - pointPrice: number // 兑换金额,单位:分 -} - -// 积分商城活动 API -export const PointActivityApi = { - // 查询积分商城活动分页 - getPointActivityPage: async (params: any) => { - return await request.get({ url: `/promotion/point-activity/page`, params }) - }, - - // 查询积分商城活动详情 - getPointActivity: async (id: number) => { - return await request.get({ url: `/promotion/point-activity/get?id=` + id }) - }, - - // 查询积分商城活动列表,基于活动编号数组 - getPointActivityListByIds: async (ids: number[]) => { - return request.get({ url: `/promotion/point-activity/list-by-ids?ids=${ids}` }) - }, - - // 新增积分商城活动 - createPointActivity: async (data: PointActivityVO) => { - return await request.post({ url: `/promotion/point-activity/create`, data }) - }, - - // 修改积分商城活动 - updatePointActivity: async (data: PointActivityVO) => { - return await request.put({ url: `/promotion/point-activity/update`, data }) - }, - - // 删除积分商城活动 - deletePointActivity: async (id: number) => { - return await request.delete({ url: `/promotion/point-activity/delete?id=` + id }) - }, - - // 关闭秒杀活动 - closePointActivity: async (id: number) => { - return await request.put({ url: '/promotion/point-activity/close?id=' + id }) - } -} diff --git a/src/api/mall/promotion/reward/rewardActivity.ts b/src/api/mall/promotion/reward/rewardActivity.ts deleted file mode 100644 index e9f95ed8..00000000 --- a/src/api/mall/promotion/reward/rewardActivity.ts +++ /dev/null @@ -1,58 +0,0 @@ -import request from '@/config/axios' - -export interface RewardActivityVO { - id?: number - name?: string - startTime?: Date - endTime?: Date - startAndEndTime?: Date[] // 只前端使用 - remark?: string - conditionType?: number - productScope?: number - rules: RewardRule[] - // 如下仅用于表单,不提交 - productScopeValues?: number[] // 商品范围:值为品类编号列表、商品编号列表 - productCategoryIds?: number[] - productSpuIds?: number[] -} - -// 优惠规则 -export interface RewardRule { - limit?: number - discountPrice?: number - freeDelivery?: boolean - point: number - giveCouponTemplateCounts?: { - [key: number]: number - } -} - -// 新增满减送活动 -export const createRewardActivity = async (data: RewardActivityVO) => { - return await request.post({ url: '/promotion/reward-activity/create', data }) -} - -// 更新满减送活动 -export const updateRewardActivity = async (data: RewardActivityVO) => { - return await request.put({ url: '/promotion/reward-activity/update', data }) -} - -// 查询满减送活动列表 -export const getRewardActivityPage = async (params) => { - return await request.get({ url: '/promotion/reward-activity/page', params }) -} - -// 查询满减送活动详情 -export const getReward = async (id: number) => { - return await request.get({ url: '/promotion/reward-activity/get?id=' + id }) -} - -// 删除满减送活动 -export const deleteRewardActivity = async (id: number) => { - return await request.delete({ url: '/promotion/reward-activity/delete?id=' + id }) -} - -// 关闭满减送活动 -export const closeRewardActivity = async (id: number) => { - return await request.put({ url: '/promotion/reward-activity/close?id=' + id }) -} diff --git a/src/api/mall/promotion/seckill/seckillActivity.ts b/src/api/mall/promotion/seckill/seckillActivity.ts deleted file mode 100644 index dc5a350a..00000000 --- a/src/api/mall/promotion/seckill/seckillActivity.ts +++ /dev/null @@ -1,75 +0,0 @@ -import request from '@/config/axios' -import { Sku, Spu } from '@/api/mall/product/spu' - -export interface SeckillActivityVO { - id?: number - spuId?: number - name?: string - status?: number - remark?: string - startTime?: Date - endTime?: Date - sort?: number - configIds?: string - orderCount?: number - userCount?: number - totalPrice?: number - totalLimitCount?: number - singleLimitCount?: number - stock?: number - totalStock?: number - seckillPrice?: number - products?: SeckillProductVO[] -} - -// 秒杀活动所需属性 -export interface SeckillProductVO { - skuId: number - spuId: number - seckillPrice: number - stock: number -} - -// 扩展 Sku 配置 -export type SkuExtension = Sku & { - productConfig: SeckillProductVO -} - -export interface SpuExtension extends Spu { - skus: SkuExtension[] // 重写类型 -} - -// 查询秒杀活动列表 -export const getSeckillActivityPage = async (params) => { - return await request.get({ url: '/promotion/seckill-activity/page', params }) -} - -// 查询秒杀活动列表,基于活动编号数组 -export const getSeckillActivityListByIds = (ids: number[]) => { - return request.get({ url: `/promotion/seckill-activity/list-by-ids?ids=${ids}` }) -} - -// 查询秒杀活动详情 -export const getSeckillActivity = async (id: number) => { - return await request.get({ url: '/promotion/seckill-activity/get?id=' + id }) -} - -// 新增秒杀活动 -export const createSeckillActivity = async (data: SeckillActivityVO) => { - return await request.post({ url: '/promotion/seckill-activity/create', data }) -} - -// 修改秒杀活动 -export const updateSeckillActivity = async (data: SeckillActivityVO) => { - return await request.put({ url: '/promotion/seckill-activity/update', data }) -} - -// 关闭秒杀活动 -export const closeSeckillActivity = async (id: number) => { - return await request.put({ url: '/promotion/seckill-activity/close?id=' + id }) -} - -// 删除秒杀活动 -export const deleteSeckillActivity = async (id: number) => { - return await request.delete({ url: '/promotion/seckill-activity/delete?id=' + id }) -} diff --git a/src/api/mall/promotion/seckill/seckillConfig.ts b/src/api/mall/promotion/seckill/seckillConfig.ts deleted file mode 100644 index 37d9b543..00000000 --- a/src/api/mall/promotion/seckill/seckillConfig.ts +++ /dev/null @@ -1,53 +0,0 @@ -import request from '@/config/axios' - -// 秒杀时段 VO -export interface SeckillConfigVO { - id: number // 编号 - name: string // 秒杀时段名称 - startTime: string // 开始时间点 - endTime: string // 结束时间点 - sliderPicUrls: string[] // 秒杀轮播图 - status: number // 活动状态 -} - -// 秒杀时段 API -export const SeckillConfigApi = { - // 查询秒杀时段分页 - getSeckillConfigPage: async (params: any) => { - return await request.get({ url: `/promotion/seckill-config/page`, params }) - }, - - // 查询秒杀时段列表 - getSimpleSeckillConfigList: async () => { - return await request.get({ url: `/promotion/seckill-config/list` }) - }, - - // 查询秒杀时段详情 - getSeckillConfig: async (id: number) => { - return await request.get({ url: `/promotion/seckill-config/get?id=` + id }) - }, - - // 新增秒杀时段 - createSeckillConfig: async (data: SeckillConfigVO) => { - return await request.post({ url: `/promotion/seckill-config/create`, data }) - }, - - // 修改秒杀时段 - updateSeckillConfig: async (data: SeckillConfigVO) => { - return await request.put({ url: `/promotion/seckill-config/update`, data }) - }, - - // 删除秒杀时段 - deleteSeckillConfig: async (id: number) => { - return await request.delete({ url: `/promotion/seckill-config/delete?id=` + id }) - }, - - // 修改时段配置状态 - updateSeckillConfigStatus: async (id: number, status: number) => { - const data = { - id, - status - } - return request.put({ url: '/promotion/seckill-config/update-status', data: data }) - } -} diff --git a/src/api/mall/statistics/common.ts b/src/api/mall/statistics/common.ts deleted file mode 100644 index 3d964392..00000000 --- a/src/api/mall/statistics/common.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** 数据对照 Response VO */ -export interface DataComparisonRespVO { - value: T - reference: T -} diff --git a/src/api/mall/statistics/member.ts b/src/api/mall/statistics/member.ts deleted file mode 100644 index d9accf92..00000000 --- a/src/api/mall/statistics/member.ts +++ /dev/null @@ -1,123 +0,0 @@ -import request from '@/config/axios' -import dayjs from 'dayjs' -import { DataComparisonRespVO } from '@/api/mall/statistics/common' -import { formatDate } from '@/utils/formatTime' - -/** 会员分析 Request VO */ -export interface MemberAnalyseReqVO { - times: dayjs.ConfigType[] -} - -/** 会员分析 Response VO */ -export interface MemberAnalyseRespVO { - visitUserCount: number - orderUserCount: number - payUserCount: number - atv: number - comparison: DataComparisonRespVO -} - -/** 会员分析对照数据 Response VO */ -export interface MemberAnalyseComparisonRespVO { - registerUserCount: number - visitUserCount: number - rechargeUserCount: number -} - -/** 会员地区统计 Response VO */ -export interface MemberAreaStatisticsRespVO { - areaId: number - areaName: string - userCount: number - orderCreateUserCount: number - orderPayUserCount: number - orderPayPrice: number -} - -/** 会员性别统计 Response VO */ -export interface MemberSexStatisticsRespVO { - sex: number - userCount: number -} - -/** 会员统计 Response VO */ -export interface MemberSummaryRespVO { - userCount: number - rechargeUserCount: number - rechargePrice: number - expensePrice: number -} - -/** 会员终端统计 Response VO */ -export interface MemberTerminalStatisticsRespVO { - terminal: number - userCount: number -} - -/** 会员数量统计 Response VO */ -export interface MemberCountRespVO { - /** 用户访问量 */ - visitUserCount: string - /** 注册用户数量 */ - registerUserCount: number -} - -/** 会员注册数量 Response VO */ -export interface MemberRegisterCountRespVO { - date: string - count: number -} - -// 查询会员统计 -export const getMemberSummary = () => { - return request.get({ - url: '/statistics/member/summary' - }) -} - -// 查询会员分析数据 -export const getMemberAnalyse = (params: MemberAnalyseReqVO) => { - return request.get({ - url: '/statistics/member/analyse', - params: { times: [formatDate(params.times[0]), formatDate(params.times[1])] } - }) -} - -// 按照省份,查询会员统计列表 -export const getMemberAreaStatisticsList = () => { - return request.get({ - url: '/statistics/member/area-statistics-list' - }) -} - -// 按照性别,查询会员统计列表 -export const getMemberSexStatisticsList = () => { - return request.get({ - url: '/statistics/member/sex-statistics-list' - }) -} - -// 按照终端,查询会员统计列表 -export const getMemberTerminalStatisticsList = () => { - return request.get({ - url: '/statistics/member/terminal-statistics-list' - }) -} - -// 获得用户数量量对照 -export const getUserCountComparison = () => { - return request.get>({ - url: '/statistics/member/user-count-comparison' - }) -} - -// 获得会员注册数量列表 -export const getMemberRegisterCountList = ( - beginTime: dayjs.ConfigType, - endTime: dayjs.ConfigType -) => { - return request.get({ - url: '/statistics/member/register-count-list', - params: { times: [formatDate(beginTime), formatDate(endTime)] } - }) -} diff --git a/src/api/mall/statistics/pay.ts b/src/api/mall/statistics/pay.ts deleted file mode 100644 index f5d14c9d..00000000 --- a/src/api/mall/statistics/pay.ts +++ /dev/null @@ -1,12 +0,0 @@ -import request from '@/config/axios' - -/** 支付统计 */ -export interface PaySummaryRespVO { - /** 充值金额,单位分 */ - rechargePrice: number -} - -/** 获取钱包充值金额 */ -export const getWalletRechargePrice = async () => { - return await request.get({ url: `/statistics/pay/summary` }) -} diff --git a/src/api/mall/statistics/product.ts b/src/api/mall/statistics/product.ts deleted file mode 100644 index 798a2fa8..00000000 --- a/src/api/mall/statistics/product.ts +++ /dev/null @@ -1,52 +0,0 @@ -import request from '@/config/axios' -import { DataComparisonRespVO } from '@/api/mall/statistics/common' - -export interface ProductStatisticsVO { - id: number - day: string - spuId: number - spuName: string - spuPicUrl: string - browseCount: number - browseUserCount: number - favoriteCount: number - cartCount: number - orderCount: number - orderPayCount: number - orderPayPrice: number - afterSaleCount: number - afterSaleRefundPrice: number - browseConvertPercent: number -} - -// 商品统计 API -export const ProductStatisticsApi = { - // 获得商品统计分析 - getProductStatisticsAnalyse: (params: any) => { - return request.get>({ - url: '/statistics/product/analyse', - params - }) - }, - // 获得商品状况明细 - getProductStatisticsList: (params: any) => { - return request.get({ - url: '/statistics/product/list', - params - }) - }, - // 导出获得商品状况明细 Excel - exportProductStatisticsExcel: (params: any) => { - return request.download({ - url: '/statistics/product/export-excel', - params - }) - }, - // 获得商品排行榜分页 - getProductStatisticsRankPage: async (params: any) => { - return await request.get({ - url: `/statistics/product/rank-page`, - params - }) - } -} diff --git a/src/api/mall/statistics/trade.ts b/src/api/mall/statistics/trade.ts deleted file mode 100644 index e59952a6..00000000 --- a/src/api/mall/statistics/trade.ts +++ /dev/null @@ -1,119 +0,0 @@ -import request from '@/config/axios' -import dayjs from 'dayjs' -import { formatDate } from '@/utils/formatTime' -import { DataComparisonRespVO } from '@/api/mall/statistics/common' - -/** 交易统计 Response VO */ -export interface TradeSummaryRespVO { - yesterdayOrderCount: number - monthOrderCount: number - yesterdayPayPrice: number - monthPayPrice: number -} - -/** 交易状况 Request VO */ -export interface TradeTrendReqVO { - times: [dayjs.ConfigType, dayjs.ConfigType] -} - -/** 交易状况统计 Response VO */ -export interface TradeTrendSummaryRespVO { - time: string - turnoverPrice: number - orderPayPrice: number - rechargePrice: number - expensePrice: number - walletPayPrice: number - brokerageSettlementPrice: number - afterSaleRefundPrice: number -} - -/** 交易订单数量 Response VO */ -export interface TradeOrderCountRespVO { - /** 待发货 */ - undelivered?: number - /** 待核销 */ - pickUp?: number - /** 退款中 */ - afterSaleApply?: number - /** 提现待审核 */ - auditingWithdraw?: number -} - -/** 交易订单统计 Response VO */ -export interface TradeOrderSummaryRespVO { - /** 支付订单商品数 */ - orderPayCount?: number - /** 总支付金额,单位:分 */ - orderPayPrice?: number -} - -/** 订单量趋势统计 Response VO */ -export interface TradeOrderTrendRespVO { - /** 日期 */ - date: string - /** 订单数量 */ - orderPayCount: number - /** 订单支付金额 */ - orderPayPrice: number -} - -// 查询交易统计 -export const getTradeStatisticsSummary = () => { - return request.get>({ - url: '/statistics/trade/summary' - }) -} - -// 获得交易状况统计 -export const getTradeStatisticsAnalyse = (params: TradeTrendReqVO) => { - return request.get>({ - url: '/statistics/trade/analyse', - params: formatDateParam(params) - }) -} - -// 获得交易状况明细 -export const getTradeStatisticsList = (params: TradeTrendReqVO) => { - return request.get({ - url: '/statistics/trade/list', - params: formatDateParam(params) - }) -} - -// 导出交易状况明细 -export const exportTradeStatisticsExcel = (params: TradeTrendReqVO) => { - return request.download({ - url: '/statistics/trade/export-excel', - params: formatDateParam(params) - }) -} - -// 获得交易订单数量 -export const getOrderCount = async () => { - return await request.get({ url: `/statistics/trade/order-count` }) -} - -// 获得交易订单数量对照 -export const getOrderComparison = async () => { - return await request.get>({ - url: `/statistics/trade/order-comparison` - }) -} - -// 获得订单量趋势统计 -export const getOrderCountTrendComparison = ( - type: number, - beginTime: dayjs.ConfigType, - endTime: dayjs.ConfigType -) => { - return request.get[]>({ - url: '/statistics/trade/order-count-trend', - params: { type, beginTime: formatDate(beginTime), endTime: formatDate(endTime) } - }) -} - -/** 时间参数需要格式化, 确保接口能识别 */ -const formatDateParam = (params: TradeTrendReqVO) => { - return { times: [formatDate(params.times[0]), formatDate(params.times[1])] } as TradeTrendReqVO -} diff --git a/src/api/mall/trade/afterSale/index.ts b/src/api/mall/trade/afterSale/index.ts deleted file mode 100644 index a109ee6b..00000000 --- a/src/api/mall/trade/afterSale/index.ts +++ /dev/null @@ -1,75 +0,0 @@ -import request from '@/config/axios' - -export interface TradeAfterSaleVO { - id?: number | null // 售后编号,主键自增 - no?: string // 售后单号 - status?: number | null // 退款状态 - way?: number | null // 售后方式 - type?: number | null // 售后类型 - userId?: number | null // 用户编号 - applyReason?: string // 申请原因 - applyDescription?: string // 补充描述 - applyPicUrls?: string[] // 补充凭证图片 - orderId?: number | null // 交易订单编号 - orderNo?: string // 订单流水号 - orderItemId?: number | null // 交易订单项编号 - spuId?: number | null // 商品 SPU 编号 - spuName?: string // 商品 SPU 名称 - skuId?: number | null // 商品 SKU 编号 - properties?: ProductPropertiesVO[] // 属性数组 - picUrl?: string // 商品图片 - count?: number | null // 退货商品数量 - auditTime?: Date // 审批时间 - auditUserId?: number | null // 审批人 - auditReason?: string // 审批备注 - refundPrice?: number | null // 退款金额,单位:分。 - payRefundId?: number | null // 支付退款编号 - refundTime?: Date // 退款时间 - logisticsId?: number | null // 退货物流公司编号 - logisticsNo?: string // 退货物流单号 - deliveryTime?: Date // 退货时间 - receiveTime?: Date // 收货时间 - receiveReason?: string // 收货备注 -} - -export interface ProductPropertiesVO { - propertyId?: number | null // 属性的编号 - propertyName?: string // 属性的名称 - valueId?: number | null //属性值的编号 - valueName?: string // 属性值的名称 -} - -// 获得交易售后分页 -export const getAfterSalePage = async (params) => { - return await request.get({ url: `/trade/after-sale/page`, params }) -} - -// 获得交易售后详情 -export const getAfterSale = async (id: any) => { - return await request.get({ url: `/trade/after-sale/get-detail?id=${id}` }) -} - -// 同意售后 -export const agree = async (id: any) => { - return await request.put({ url: `/trade/after-sale/agree?id=${id}` }) -} - -// 拒绝售后 -export const disagree = async (data: any) => { - return await request.put({ url: `/trade/after-sale/disagree`, data }) -} - -// 确认收货 -export const receive = async (id: any) => { - return await request.put({ url: `/trade/after-sale/receive?id=${id}` }) -} - -// 拒绝收货 -export const refuse = async (id: any) => { - return await request.put({ url: `/trade/after-sale/refuse?id=${id}` }) -} - -// 确认退款 -export const refund = async (id: any) => { - return await request.put({ url: `/trade/after-sale/refund?id=${id}` }) -} diff --git a/src/api/mall/trade/brokerage/record/index.ts b/src/api/mall/trade/brokerage/record/index.ts deleted file mode 100644 index 7df9a225..00000000 --- a/src/api/mall/trade/brokerage/record/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -import request from '@/config/axios' - -// 查询佣金记录列表 -export const getBrokerageRecordPage = async (params: any) => { - return await request.get({ url: `/trade/brokerage-record/page`, params }) -} - -// 查询佣金记录详情 -export const getBrokerageRecord = async (id: number) => { - return await request.get({ url: `/trade/brokerage-record/get?id=` + id }) -} diff --git a/src/api/mall/trade/brokerage/user/index.ts b/src/api/mall/trade/brokerage/user/index.ts deleted file mode 100644 index 1fed3bfa..00000000 --- a/src/api/mall/trade/brokerage/user/index.ts +++ /dev/null @@ -1,39 +0,0 @@ -import request from '@/config/axios' - -export interface BrokerageUserVO { - id: number - bindUserId: number - bindUserTime: Date - brokerageEnabled: boolean - brokerageTime: Date - price: number - frozenPrice: number - - nickname: string - avatar: string -} - -// 查询分销用户列表 -export const getBrokerageUserPage = async (params: any) => { - return await request.get({ url: `/trade/brokerage-user/page`, params }) -} - -// 查询分销用户详情 -export const getBrokerageUser = async (id: number) => { - return await request.get({ url: `/trade/brokerage-user/get?id=` + id }) -} - -// 修改推广员 -export const updateBindUser = async (data: any) => { - return await request.put({ url: `/trade/brokerage-user/update-bind-user`, data }) -} - -// 清除推广员 -export const clearBindUser = async (data: any) => { - return await request.put({ url: `/trade/brokerage-user/clear-bind-user`, data }) -} - -// 修改推广资格 -export const updateBrokerageEnabled = async (data: any) => { - return await request.put({ url: `/trade/brokerage-user/update-brokerage-enable`, data }) -} diff --git a/src/api/mall/trade/brokerage/withdraw/index.ts b/src/api/mall/trade/brokerage/withdraw/index.ts deleted file mode 100644 index c93286a9..00000000 --- a/src/api/mall/trade/brokerage/withdraw/index.ts +++ /dev/null @@ -1,39 +0,0 @@ -import request from '@/config/axios' - -export interface BrokerageWithdrawVO { - id: number - userId: number - price: number - feePrice: number - totalPrice: number - type: number - name: string - accountNo: string - bankName: string - bankAddress: string - accountQrCodeUrl: string - status: number - auditReason: string - auditTime: Date - remark: string -} - -// 查询佣金提现列表 -export const getBrokerageWithdrawPage = async (params: any) => { - return await request.get({ url: `/trade/brokerage-withdraw/page`, params }) -} - -// 查询佣金提现详情 -export const getBrokerageWithdraw = async (id: number) => { - return await request.get({ url: `/trade/brokerage-withdraw/get?id=` + id }) -} - -// 佣金提现 - 通过申请 -export const approveBrokerageWithdraw = async (id: number) => { - return await request.put({ url: `/trade/brokerage-withdraw/approve?id=` + id }) -} - -// 审核佣金提现 - 驳回申请 -export const rejectBrokerageWithdraw = async (data: BrokerageWithdrawVO) => { - return await request.put({ url: `/trade/brokerage-withdraw/reject`, data }) -} diff --git a/src/api/mall/trade/config/index.ts b/src/api/mall/trade/config/index.ts deleted file mode 100644 index 43fdbdf1..00000000 --- a/src/api/mall/trade/config/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -import request from '@/config/axios' - -export interface ConfigVO { - brokerageEnabled: boolean - brokerageEnabledCondition: number - brokerageBindMode: number - brokeragePosterUrls: string - brokerageFirstPercent: number - brokerageSecondPercent: number - brokerageWithdrawMinPrice: number - brokerageFrozenDays: number - brokerageWithdrawTypes: string -} - -// 查询交易中心配置详情 -export const getTradeConfig = async () => { - return await request.get({ url: `/trade/config/get` }) -} - -// 保存交易中心配置 -export const saveTradeConfig = async (data: ConfigVO) => { - return await request.put({ url: `/trade/config/save`, data }) -} diff --git a/src/api/mall/trade/delivery/express/index.ts b/src/api/mall/trade/delivery/express/index.ts deleted file mode 100644 index 0070bcd6..00000000 --- a/src/api/mall/trade/delivery/express/index.ts +++ /dev/null @@ -1,45 +0,0 @@ -import request from '@/config/axios' - -export interface DeliveryExpressVO { - id: number - code: string - name: string - logo: string - sort: number - status: number -} - -// 查询快递公司列表 -export const getDeliveryExpressPage = async (params: PageParam) => { - return await request.get({ url: '/trade/delivery/express/page', params }) -} - -// 查询快递公司详情 -export const getDeliveryExpress = async (id: number) => { - return await request.get({ url: '/trade/delivery/express/get?id=' + id }) -} - -// 获得快递公司精简信息列表 -export const getSimpleDeliveryExpressList = () => { - return request.get({ url: '/trade/delivery/express/list-all-simple' }) -} - -// 新增快递公司 -export const createDeliveryExpress = async (data: DeliveryExpressVO) => { - return await request.post({ url: '/trade/delivery/express/create', data }) -} - -// 修改快递公司 -export const updateDeliveryExpress = async (data: DeliveryExpressVO) => { - return await request.put({ url: '/trade/delivery/express/update', data }) -} - -// 删除快递公司 -export const deleteDeliveryExpress = async (id: number) => { - return await request.delete({ url: '/trade/delivery/express/delete?id=' + id }) -} - -// 导出快递公司 Excel -export const exportDeliveryExpressApi = async (params) => { - return await request.download({ url: '/trade/delivery/express/export-excel', params }) -} diff --git a/src/api/mall/trade/delivery/expressTemplate/index.ts b/src/api/mall/trade/delivery/expressTemplate/index.ts deleted file mode 100644 index 9ed23bc1..00000000 --- a/src/api/mall/trade/delivery/expressTemplate/index.ts +++ /dev/null @@ -1,54 +0,0 @@ -import request from '@/config/axios' - -export interface DeliveryExpressTemplateVO { - id: number - name: string - chargeMode: number - sort: number - templateCharge: ExpressTemplateChargeVO[] - templateFree: ExpressTemplateFreeVO[] -} - -export declare type ExpressTemplateChargeVO = { - areaIds: number[] - startCount: number - startPrice: number - extraCount: number - extraPrice: number -} - -export declare type ExpressTemplateFreeVO = { - areaIds: number[] - freeCount: number - freePrice: number -} - -// 查询快递运费模板列表 -export const getDeliveryExpressTemplatePage = async (params: PageParam) => { - return await request.get({ url: '/trade/delivery/express-template/page', params }) -} - -// 查询快递运费模板详情 -export const getDeliveryExpressTemplate = async (id: number) => { - return await request.get({ url: '/trade/delivery/express-template/get?id=' + id }) -} - -// 查询快递运费模板详情 -export const getSimpleTemplateList = async () => { - return await request.get({ url: '/trade/delivery/express-template/list-all-simple' }) -} - -// 新增快递运费模板 -export const createDeliveryExpressTemplate = async (data: DeliveryExpressTemplateVO) => { - return await request.post({ url: '/trade/delivery/express-template/create', data }) -} - -// 修改快递运费模板 -export const updateDeliveryExpressTemplate = async (data: DeliveryExpressTemplateVO) => { - return await request.put({ url: '/trade/delivery/express-template/update', data }) -} - -// 删除快递运费模板 -export const deleteDeliveryExpressTemplate = async (id: number) => { - return await request.delete({ url: '/trade/delivery/express-template/delete?id=' + id }) -} diff --git a/src/api/mall/trade/delivery/pickUpStore/index.ts b/src/api/mall/trade/delivery/pickUpStore/index.ts deleted file mode 100644 index ea6c852b..00000000 --- a/src/api/mall/trade/delivery/pickUpStore/index.ts +++ /dev/null @@ -1,52 +0,0 @@ -import request from '@/config/axios' - -export interface DeliveryPickUpStoreVO { - id: number - name: string - introduction: string - phone: string - areaId: number - detailAddress: string - logo: string - openingTime: string - closingTime: string - latitude: number - longitude: number - status: number - verifyUserIds: number[] // 绑定用户编号组数 -} - -// 查询自提门店列表 -export const getDeliveryPickUpStorePage = async (params: any) => { - return await request.get({ url: '/trade/delivery/pick-up-store/page', params }) -} - -// 查询自提门店详情 -export const getDeliveryPickUpStore = async (id: number) => { - return await request.get({ url: '/trade/delivery/pick-up-store/get?id=' + id }) -} - -// 查询自提门店精简列表 -export const getSimpleDeliveryPickUpStoreList = async (): Promise => { - return await request.get({ url: '/trade/delivery/pick-up-store/simple-list' }) -} - -// 新增自提门店 -export const createDeliveryPickUpStore = async (data: DeliveryPickUpStoreVO) => { - return await request.post({ url: '/trade/delivery/pick-up-store/create', data }) -} - -// 修改自提门店 -export const updateDeliveryPickUpStore = async (data: DeliveryPickUpStoreVO) => { - return await request.put({ url: '/trade/delivery/pick-up-store/update', data }) -} - -// 删除自提门店 -export const deleteDeliveryPickUpStore = async (id: number) => { - return await request.delete({ url: '/trade/delivery/pick-up-store/delete?id=' + id }) -} - -// 绑定自提店员 -export const bindStoreStaffId = async (data: any) => { - return await request.post({ url: '/trade/delivery/pick-up-store/bind', data }) -} diff --git a/src/api/mall/trade/order/index.ts b/src/api/mall/trade/order/index.ts deleted file mode 100644 index 37fee8c7..00000000 --- a/src/api/mall/trade/order/index.ts +++ /dev/null @@ -1,188 +0,0 @@ -import request from '@/config/axios' - -export interface OrderVO { - // ========== 订单基本信息 ========== - id?: number | null // 订单编号 - no?: string // 订单流水号 - createTime?: Date | null // 下单时间 - type?: number | null // 订单类型 - terminal?: number | null // 订单来源 - userId?: number | null // 用户编号 - userIp?: string // 用户 IP - userRemark?: string // 用户备注 - status?: number | null // 订单状态 - productCount?: number | null // 购买的商品数量 - finishTime?: Date | null // 订单完成时间 - cancelTime?: Date | null // 订单取消时间 - cancelType?: number | null // 取消类型 - remark?: string // 商家备注 - - // ========== 价格 + 支付基本信息 ========== - payOrderId?: number | null // 支付订单编号 - payStatus?: boolean // 是否已支付 - payTime?: Date | null // 付款时间 - payChannelCode?: string // 支付渠道 - totalPrice?: number | null // 商品原价(总) - discountPrice?: number | null // 订单优惠(总) - deliveryPrice?: number | null // 运费金额 - adjustPrice?: number | null // 订单调价(总) - payPrice?: number | null // 应付金额(总) - // ========== 收件 + 物流基本信息 ========== - deliveryType?: number | null // 发货方式 - pickUpStoreId?: number // 自提门店编号 - pickUpVerifyCode?: string // 自提核销码 - deliveryTemplateId?: number | null // 配送模板编号 - logisticsId?: number | null // 发货物流公司编号 - logisticsNo?: string // 发货物流单号 - deliveryTime?: Date | null // 发货时间 - receiveTime?: Date | null // 收货时间 - receiverName?: string // 收件人名称 - receiverMobile?: string // 收件人手机 - receiverPostCode?: number | null // 收件人邮编 - receiverAreaId?: number | null // 收件人地区编号 - receiverAreaName?: string //收件人地区名字 - receiverDetailAddress?: string // 收件人详细地址 - - // ========== 售后基本信息 ========== - afterSaleStatus?: number | null // 售后状态 - refundPrice?: number | null // 退款金额 - - // ========== 营销基本信息 ========== - couponId?: number | null // 优惠劵编号 - couponPrice?: number | null // 优惠劵减免金额 - pointPrice?: number | null // 积分抵扣的金额 - vipPrice?: number | null // VIP 减免金额 - - items?: OrderItemRespVO[] // 订单项列表 - // 下单用户信息 - user?: { - id?: number | null - nickname?: string - avatar?: string - } - // 推广用户信息 - brokerageUser?: { - id?: number | null - nickname?: string - avatar?: string - } - // 订单操作日志 - logs?: OrderLogRespVO[] -} - -export interface OrderLogRespVO { - content?: string - createTime?: Date - userType?: number -} - -export interface OrderItemRespVO { - // ========== 订单项基本信息 ========== - id?: number | null // 编号 - userId?: number | null // 用户编号 - orderId?: number | null // 订单编号 - // ========== 商品基本信息 ========== - spuId?: number | null // 商品 SPU 编号 - spuName?: string //商品 SPU 名称 - skuId?: number | null // 商品 SKU 编号 - picUrl?: string //商品图片 - count?: number | null //购买数量 - // ========== 价格 + 支付基本信息 ========== - originalPrice?: number | null //商品原价(总) - originalUnitPrice?: number | null //商品原价(单) - discountPrice?: number | null //商品优惠(总) - payPrice?: number | null //商品实付金额(总) - orderPartPrice?: number | null //子订单分摊金额(总) - orderDividePrice?: number | null //分摊后子订单实付金额(总) - // ========== 营销基本信息 ========== - // TODO 芋艿:在捉摸一下 - // ========== 售后基本信息 ========== - afterSaleStatus?: number | null // 售后状态 - properties?: ProductPropertiesVO[] //属性数组 -} - -export interface ProductPropertiesVO { - propertyId?: number | null // 属性的编号 - propertyName?: string // 属性的名称 - valueId?: number | null //属性值的编号 - valueName?: string // 属性值的名称 -} - -/** 交易订单统计 */ -export interface TradeOrderSummaryRespVO { - /** 订单数量 */ - orderCount?: number - /** 订单金额 */ - orderPayPrice?: string - /** 退款单数 */ - afterSaleCount?: number - /** 退款金额 */ - afterSalePrice?: string -} - -// 查询交易订单列表 -export const getOrderPage = async (params: any) => { - return await request.get({ url: `/trade/order/page`, params }) -} - -// 查询交易订单统计 -export const getOrderSummary = async (params: any) => { - return await request.get({ url: `/trade/order/summary`, params }) -} - -// 查询交易订单详情 -export const getOrder = async (id: number | null) => { - return await request.get({ url: `/trade/order/get-detail?id=` + id }) -} - -// 查询交易订单物流详情 -export const getExpressTrackList = async (id: number | null) => { - return await request.get({ url: `/trade/order/get-express-track-list?id=` + id }) -} - -export interface DeliveryVO { - id?: number // 订单编号 - logisticsId: number | null // 物流公司编号 - logisticsNo: string // 物流编号 -} - -// 订单发货 -export const deliveryOrder = async (data: DeliveryVO) => { - return await request.put({ url: `/trade/order/delivery`, data }) -} - -// 订单备注 -export const updateOrderRemark = async (data: any) => { - return await request.put({ url: `/trade/order/update-remark`, data }) -} - -// 订单调价 -export const updateOrderPrice = async (data: any) => { - return await request.put({ url: `/trade/order/update-price`, data }) -} - -// 修改订单地址 -export const updateOrderAddress = async (data: any) => { - return await request.put({ url: `/trade/order/update-address`, data }) -} - -// 订单核销 -export const pickUpOrder = async (id: number) => { - return await request.put({ url: `/trade/order/pick-up-by-id?id=${id}` }) -} - -// 订单核销 -export const pickUpOrderByVerifyCode = async (pickUpVerifyCode: string) => { - return await request.put({ - url: `/trade/order/pick-up-by-verify-code`, - params: { pickUpVerifyCode } - }) -} - -// 查询核销码对应的订单 -export const getOrderByPickUpVerifyCode = async (pickUpVerifyCode: string) => { - return await request.get({ - url: `/trade/order/get-by-pick-up-verify-code`, - params: { pickUpVerifyCode } - }) -} diff --git a/src/api/member/address/index.ts b/src/api/member/address/index.ts deleted file mode 100644 index a914f979..00000000 --- a/src/api/member/address/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -import request from '@/config/axios' - -export interface AddressVO { - id: number - name: string - mobile: string - areaId: number - detailAddress: string - defaultStatus: boolean -} - -// 查询用户收件地址列表 -export const getAddressList = async (params) => { - return await request.get({ url: `/member/address/list`, params }) -} diff --git a/src/api/member/config/index.ts b/src/api/member/config/index.ts deleted file mode 100644 index 7ddca16b..00000000 --- a/src/api/member/config/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -import request from '@/config/axios' - -export interface ConfigVO { - id: number - pointTradeDeductEnable: number - pointTradeDeductUnitPrice: number - pointTradeDeductMaxPrice: number - pointTradeGivePoint: number -} - -// 查询积分设置详情 -export const getConfig = async () => { - return await request.get({ url: `/member/config/get` }) -} - -// 新增修改积分设置 -export const saveConfig = async (data: ConfigVO) => { - return await request.put({ url: `/member/config/save`, data }) -} diff --git a/src/api/member/experience-record/index.ts b/src/api/member/experience-record/index.ts deleted file mode 100644 index 6d40a48d..00000000 --- a/src/api/member/experience-record/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -import request from '@/config/axios' - -export interface ExperienceRecordVO { - id: number - userId: number - bizId: string - bizType: number - title: string - description: string - experience: number - totalExperience: number -} - -// 查询会员经验记录列表 -export const getExperienceRecordPage = async (params) => { - return await request.get({ url: `/member/experience-record/page`, params }) -} - -// 查询会员经验记录详情 -export const getExperienceRecord = async (id: number) => { - return await request.get({ url: `/member/experience-record/get?id=` + id }) -} diff --git a/src/api/member/group/index.ts b/src/api/member/group/index.ts deleted file mode 100644 index df3054e2..00000000 --- a/src/api/member/group/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -import request from '@/config/axios' - -export interface GroupVO { - id: number - name: string - remark: string - status: number -} - -// 查询用户分组列表 -export const getGroupPage = async (params: any) => { - return await request.get({ url: `/member/group/page`, params }) -} - -// 查询用户分组详情 -export const getGroup = async (id: number) => { - return await request.get({ url: `/member/group/get?id=` + id }) -} - -// 新增用户分组 -export const createGroup = async (data: GroupVO) => { - return await request.post({ url: `/member/group/create`, data }) -} - -// 查询用户分组 - 精简信息列表 -export const getSimpleGroupList = async () => { - return await request.get({ url: `/member/group/list-all-simple` }) -} - -// 修改用户分组 -export const updateGroup = async (data: GroupVO) => { - return await request.put({ url: `/member/group/update`, data }) -} - -// 删除用户分组 -export const deleteGroup = async (id: number) => { - return await request.delete({ url: `/member/group/delete?id=` + id }) -} diff --git a/src/api/member/level/index.ts b/src/api/member/level/index.ts deleted file mode 100644 index 0ded493a..00000000 --- a/src/api/member/level/index.ts +++ /dev/null @@ -1,42 +0,0 @@ -import request from '@/config/axios' - -export interface LevelVO { - id: number - name: string - experience: number - value: number - discountPercent: number - icon: string - bgUrl: string - status: number -} - -// 查询会员等级列表 -export const getLevelList = async (params) => { - return await request.get({ url: `/member/level/list`, params }) -} - -// 查询会员等级详情 -export const getLevel = async (id: number) => { - return await request.get({ url: `/member/level/get?id=` + id }) -} - -// 查询会员等级 - 精简信息列表 -export const getSimpleLevelList = async () => { - return await request.get({ url: `/member/level/list-all-simple` }) -} - -// 新增会员等级 -export const createLevel = async (data: LevelVO) => { - return await request.post({ url: `/member/level/create`, data }) -} - -// 修改会员等级 -export const updateLevel = async (data: LevelVO) => { - return await request.put({ url: `/member/level/update`, data }) -} - -// 删除会员等级 -export const deleteLevel = async (id: number) => { - return await request.delete({ url: `/member/level/delete?id=` + id }) -} diff --git a/src/api/member/point/record/index.ts b/src/api/member/point/record/index.ts deleted file mode 100644 index f47ae467..00000000 --- a/src/api/member/point/record/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import request from '@/config/axios' - -export interface RecordVO { - id: number - bizId: string - bizType: string - title: string - description: string - point: number - totalPoint: number - userId: number - createDate: Date -} - -// 查询用户积分记录列表 -export const getRecordPage = async (params) => { - return await request.get({ url: `/member/point/record/page`, params }) -} diff --git a/src/api/member/signin/config/index.ts b/src/api/member/signin/config/index.ts deleted file mode 100644 index 50a7d63c..00000000 --- a/src/api/member/signin/config/index.ts +++ /dev/null @@ -1,34 +0,0 @@ -import request from '@/config/axios' - -export interface SignInConfigVO { - id?: number - day?: number - point?: number - experience?: number - status?: number -} - -// 查询积分签到规则列表 -export const getSignInConfigList = async () => { - return await request.get({ url: `/member/sign-in/config/list` }) -} - -// 查询积分签到规则详情 -export const getSignInConfig = async (id: number) => { - return await request.get({ url: `/member/sign-in/config/get?id=` + id }) -} - -// 新增积分签到规则 -export const createSignInConfig = async (data: SignInConfigVO) => { - return await request.post({ url: `/member/sign-in/config/create`, data }) -} - -// 修改积分签到规则 -export const updateSignInConfig = async (data: SignInConfigVO) => { - return await request.put({ url: `/member/sign-in/config/update`, data }) -} - -// 删除积分签到规则 -export const deleteSignInConfig = async (id: number) => { - return await request.delete({ url: `/member/sign-in/config/delete?id=` + id }) -} diff --git a/src/api/member/signin/record/index.ts b/src/api/member/signin/record/index.ts deleted file mode 100644 index 7d137029..00000000 --- a/src/api/member/signin/record/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -import request from '@/config/axios' - -export interface SignInRecordVO { - id: number - userId: number - day: number - point: number -} - -// 查询用户签到积分列表 -export const getSignInRecordPage = async (params) => { - return await request.get({ url: `/member/sign-in/record/page`, params }) -} diff --git a/src/api/member/tag/index.ts b/src/api/member/tag/index.ts deleted file mode 100644 index 7ff6e9bf..00000000 --- a/src/api/member/tag/index.ts +++ /dev/null @@ -1,36 +0,0 @@ -import request from '@/config/axios' - -export interface TagVO { - id: number - name: string -} - -// 查询会员标签列表 -export const getMemberTagPage = async (params: any) => { - return await request.get({ url: `/member/tag/page`, params }) -} - -// 查询会员标签详情 -export const getMemberTag = async (id: number) => { - return await request.get({ url: `/member/tag/get?id=` + id }) -} - -// 查询会员标签 - 精简信息列表 -export const getSimpleTagList = async () => { - return await request.get({ url: `/member/tag/list-all-simple` }) -} - -// 新增会员标签 -export const createMemberTag = async (data: TagVO) => { - return await request.post({ url: `/member/tag/create`, data }) -} - -// 修改会员标签 -export const updateMemberTag = async (data: TagVO) => { - return await request.put({ url: `/member/tag/update`, data }) -} - -// 删除会员标签 -export const deleteMemberTag = async (id: number) => { - return await request.delete({ url: `/member/tag/delete?id=` + id }) -} diff --git a/src/api/member/user/index.ts b/src/api/member/user/index.ts deleted file mode 100644 index 1f8acf49..00000000 --- a/src/api/member/user/index.ts +++ /dev/null @@ -1,48 +0,0 @@ -import request from '@/config/axios' - -export interface UserVO { - id: number - avatar: string | undefined - birthday: number | undefined - createTime: number | undefined - loginDate: number | undefined - loginIp: string - mark: string - mobile: string - name: string | undefined - nickname: string | undefined - registerIp: string - sex: number - status: number - areaId: number | undefined - areaName: string | undefined - levelName: string | null - point: number | undefined | null - totalPoint: number | undefined | null - experience: number | null | undefined -} - -// 查询会员用户列表 -export const getUserPage = async (params) => { - return await request.get({ url: `/member/user/page`, params }) -} - -// 查询会员用户详情 -export const getUser = async (id: number) => { - return await request.get({ url: `/member/user/get?id=` + id }) -} - -// 修改会员用户 -export const updateUser = async (data: UserVO) => { - return await request.put({ url: `/member/user/update`, data }) -} - -// 修改会员用户等级 -export const updateUserLevel = async (data: any) => { - return await request.put({ url: `/member/user/update-level`, data }) -} - -// 修改会员用户积分 -export const updateUserPoint = async (data: any) => { - return await request.put({ url: `/member/user/update-point`, data }) -} diff --git a/src/api/pay/app/index.ts b/src/api/pay/app/index.ts deleted file mode 100644 index d6fa83cf..00000000 --- a/src/api/pay/app/index.ts +++ /dev/null @@ -1,68 +0,0 @@ -import request from '@/config/axios' - -export interface AppVO { - id: number - appKey: string - name: string - status: number - remark: string - payNotifyUrl: string - refundNotifyUrl: string - transferNotifyUrl: string - merchantId: number - merchantName: string - createTime: Date -} - -export interface AppPageReqVO extends PageParam { - name?: string - status?: number - remark?: string - payNotifyUrl?: string - refundNotifyUrl?: string - transferNotifyUrl?: string - merchantName?: string - createTime?: Date[] -} - -export interface AppUpdateStatusReqVO { - id: number - status: number -} - -// 查询列表支付应用 -export const getAppPage = (params: AppPageReqVO) => { - return request.get({ url: '/pay/app/page', params }) -} - -// 查询详情支付应用 -export const getApp = (id: number) => { - return request.get({ url: '/pay/app/get?id=' + id }) -} - -// 新增支付应用 -export const createApp = (data: AppVO) => { - return request.post({ url: '/pay/app/create', data }) -} - -// 修改支付应用 -export const updateApp = (data: AppVO) => { - return request.put({ url: '/pay/app/update', data }) -} - -// 支付应用信息状态修改 -export const changeAppStatus = (data: AppUpdateStatusReqVO) => { - return request.put({ url: '/pay/app/update-status', data: data }) -} - -// 删除支付应用 -export const deleteApp = (id: number) => { - return request.delete({ url: '/pay/app/delete?id=' + id }) -} - -// 获得支付应用列表 -export const getAppList = () => { - return request.get({ - url: '/pay/app/list' - }) -} diff --git a/src/api/pay/channel/index.ts b/src/api/pay/channel/index.ts deleted file mode 100644 index 0f4ff424..00000000 --- a/src/api/pay/channel/index.ts +++ /dev/null @@ -1,46 +0,0 @@ -import request from '@/config/axios' - -export interface ChannelVO { - id: number - code: string - config: string - status: number - remark: string - feeRate: number - appId: number - createTime: Date -} - -// 查询列表支付渠道 -export const getChannelPage = (params: PageParam) => { - return request.get({ url: '/pay/channel/page', params }) -} - -// 查询详情支付渠道 -export const getChannel = (appId: string, code: string) => { - const params = { - appId: appId, - code: code - } - return request.get({ url: '/pay/channel/get', params: params }) -} - -// 新增支付渠道 -export const createChannel = (data: ChannelVO) => { - return request.post({ url: '/pay/channel/create', data }) -} - -// 修改支付渠道 -export const updateChannel = (data: ChannelVO) => { - return request.put({ url: '/pay/channel/update', data }) -} - -// 删除支付渠道 -export const deleteChannel = (id: number) => { - return request.delete({ url: '/pay/channel/delete?id=' + id }) -} - -// 导出支付渠道 -export const exportChannel = (params) => { - return request.download({ url: '/pay/channel/export-excel', params }) -} diff --git a/src/api/pay/demo/index.ts b/src/api/pay/demo/index.ts deleted file mode 100644 index 3824a8b2..00000000 --- a/src/api/pay/demo/index.ts +++ /dev/null @@ -1,36 +0,0 @@ -import request from '@/config/axios' - -export interface DemoOrderVO { - spuId: number - createTime: Date -} - -// 创建示例订单 -export function createDemoOrder(data: DemoOrderVO) { - return request.post({ - url: '/pay/demo-order/create', - data: data - }) -} - -// 获得示例订单 -export function getDemoOrder(id: number) { - return request.get({ - url: '/pay/demo-order/get?id=' + id - }) -} - -// 获得示例订单分页 -export function getDemoOrderPage(query: PageParam) { - return request.get({ - url: '/pay/demo-order/page', - params: query - }) -} - -// 退款示例订单 -export function refundDemoOrder(id) { - return request.put({ - url: '/pay/demo-order/refund?id=' + id - }) -} diff --git a/src/api/pay/demo/transfer/index.ts b/src/api/pay/demo/transfer/index.ts deleted file mode 100644 index a95b0d5c..00000000 --- a/src/api/pay/demo/transfer/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import request from '@/config/axios' - -export interface DemoTransferVO { - price: number - type: number - userName: string - alipayLogonId: string - openid: string -} - -// 创建示例转账单 -export function createDemoTransfer(data: DemoTransferVO) { - return request.post({ - url: '/pay/demo-transfer/create', - data: data - }) -} - -// 获得示例订单分页 -export function getDemoTransferPage(query: PageParam) { - return request.get({ - url: '/pay/demo-transfer/page', - params: query - }) -} diff --git a/src/api/pay/notify/index.ts b/src/api/pay/notify/index.ts deleted file mode 100644 index dc8bd887..00000000 --- a/src/api/pay/notify/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -import request from '@/config/axios' - -// 获得支付通知明细 -export const getNotifyTaskDetail = (id) => { - return request.get({ - url: '/pay/notify/get-detail?id=' + id - }) -} - -// 获得支付通知分页 -export const getNotifyTaskPage = (query) => { - return request.get({ - url: '/pay/notify/page', - params: query - }) -} diff --git a/src/api/pay/order/index.ts b/src/api/pay/order/index.ts deleted file mode 100644 index 6460c4d1..00000000 --- a/src/api/pay/order/index.ts +++ /dev/null @@ -1,110 +0,0 @@ -import request from '@/config/axios' - -export interface OrderVO { - id: number - merchantId: number - appId: number - channelId: number - channelCode: string - merchantOrderId: string - subject: string - body: string - notifyUrl: string - notifyStatus: number - amount: number - channelFeeRate: number - channelFeeAmount: number - status: number - userIp: string - expireTime: Date - successTime: Date - notifyTime: Date - successExtensionId: number - refundStatus: number - refundTimes: number - refundAmount: number - channelUserId: string - channelOrderNo: string - createTime: Date -} - -export interface OrderPageReqVO extends PageParam { - merchantId?: number - appId?: number - channelId?: number - channelCode?: string - merchantOrderId?: string - subject?: string - body?: string - notifyUrl?: string - notifyStatus?: number - amount?: number - channelFeeRate?: number - channelFeeAmount?: number - status?: number - expireTime?: Date[] - successTime?: Date[] - notifyTime?: Date[] - successExtensionId?: number - refundStatus?: number - refundTimes?: number - channelUserId?: string - channelOrderNo?: string - createTime?: Date[] -} - -export interface OrderExportReqVO { - merchantId?: number - appId?: number - channelId?: number - channelCode?: string - merchantOrderId?: string - subject?: string - body?: string - notifyUrl?: string - notifyStatus?: number - amount?: number - channelFeeRate?: number - channelFeeAmount?: number - status?: number - expireTime?: Date[] - successTime?: Date[] - notifyTime?: Date[] - successExtensionId?: number - refundStatus?: number - refundTimes?: number - channelUserId?: string - channelOrderNo?: string - createTime?: Date[] -} - -// 查询列表支付订单 -export const getOrderPage = async (params: OrderPageReqVO) => { - return await request.get({ url: '/pay/order/page', params }) -} - -// 查询详情支付订单 -export const getOrder = async (id: number, sync?: boolean) => { - return await request.get({ - url: '/pay/order/get', - params: { - id, - sync - } - }) -} - -// 获得支付订单的明细 -export const getOrderDetail = async (id: number) => { - return await request.get({ url: '/pay/order/get-detail?id=' + id }) -} - -// 提交支付订单 -export const submitOrder = async (data: any) => { - return await request.post({ url: '/pay/order/submit', data }) -} - -// 导出支付订单 -export const exportOrder = async (params: OrderExportReqVO) => { - return await request.download({ url: '/pay/order/export-excel', params }) -} diff --git a/src/api/pay/refund/index.ts b/src/api/pay/refund/index.ts deleted file mode 100644 index 4b587f22..00000000 --- a/src/api/pay/refund/index.ts +++ /dev/null @@ -1,116 +0,0 @@ -import request from '@/config/axios' - -export interface RefundVO { - id: number - merchantId: number - appId: number - channelId: number - channelCode: string - orderId: string - tradeNo: string - merchantOrderId: string - merchantRefundNo: string - notifyUrl: string - notifyStatus: number - status: number - type: number - payAmount: number - refundAmount: number - reason: string - userIp: string - channelOrderNo: string - channelRefundNo: string - channelErrorCode: string - channelErrorMsg: string - channelExtras: string - expireTime: Date - successTime: Date - notifyTime: Date - createTime: Date -} - -export interface RefundPageReqVO extends PageParam { - merchantId?: number - appId?: number - channelId?: number - channelCode?: string - orderId?: string - tradeNo?: string - merchantOrderId?: string - merchantRefundNo?: string - notifyUrl?: string - notifyStatus?: number - status?: number - type?: number - payAmount?: number - refundAmount?: number - reason?: string - userIp?: string - channelOrderNo?: string - channelRefundNo?: string - channelErrorCode?: string - channelErrorMsg?: string - channelExtras?: string - expireTime?: Date[] - successTime?: Date[] - notifyTime?: Date[] - createTime?: Date[] -} - -export interface PayRefundExportReqVO { - merchantId?: number - appId?: number - channelId?: number - channelCode?: string - orderId?: string - tradeNo?: string - merchantOrderId?: string - merchantRefundNo?: string - notifyUrl?: string - notifyStatus?: number - status?: number - type?: number - payAmount?: number - refundAmount?: number - reason?: string - userIp?: string - channelOrderNo?: string - channelRefundNo?: string - channelErrorCode?: string - channelErrorMsg?: string - channelExtras?: string - expireTime?: Date[] - successTime?: Date[] - notifyTime?: Date[] - createTime?: Date[] -} - -// 查询列表退款订单 -export const getRefundPage = (params: RefundPageReqVO) => { - return request.get({ url: '/pay/refund/page', params }) -} - -// 查询详情退款订单 -export const getRefund = (id: number) => { - return request.get({ url: '/pay/refund/get?id=' + id }) -} - -// 新增退款订单 -export const createRefund = (data: RefundVO) => { - return request.post({ url: '/pay/refund/create', data }) -} - -// 修改退款订单 -export const updateRefund = (data: RefundVO) => { - return request.put({ url: '/pay/refund/update', data }) -} - -// 删除退款订单 -export const deleteRefund = (id: number) => { - return request.delete({ url: '/pay/refund/delete?id=' + id }) -} - -// 导出退款订单 -export const exportRefund = (params: PayRefundExportReqVO) => { - return request.download({ url: '/pay/refund/export-excel', params }) -} diff --git a/src/api/pay/transfer/index.ts b/src/api/pay/transfer/index.ts deleted file mode 100644 index 7a58abf4..00000000 --- a/src/api/pay/transfer/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -import request from '@/config/axios' - -export interface TransferVO { - appId: number - channelCode: string - merchantTransferId: string - type: number - price: number - subject: string - userName: string - alipayLogonId: string - openid: string -} - -// 新增转账单 -export const createTransfer = async (data: TransferVO) => { - return await request.post({ url: `/pay/transfer/create`, data }) -} - -// 查询转账单列表 -export const getTransferPage = async (params) => { - return await request.get({ url: `/pay/transfer/page`, params }) -} - -export const getTransfer = async (id: number) => { - return await request.get({ url: '/pay/transfer/get?id=' + id }) -} diff --git a/src/api/pay/wallet/balance/index.ts b/src/api/pay/wallet/balance/index.ts deleted file mode 100644 index d7c3edde..00000000 --- a/src/api/pay/wallet/balance/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -import request from '@/config/axios' - -/** 用户钱包查询参数 */ -export interface PayWalletUserReqVO { - userId: number -} - -/** 钱包 VO */ -export interface WalletVO { - id: number - userId: number - userType: number - balance: number - totalExpense: number - totalRecharge: number - freezePrice: number -} - -/** 查询用户钱包详情 */ -export const getWallet = async (params: PayWalletUserReqVO) => { - return await request.get({ url: `/pay/wallet/get`, params }) -} - -/** 查询会员钱包列表 */ -export const getWalletPage = async (params: any) => { - return await request.get({ url: `/pay/wallet/page`, params }) -} - -/** 修改会员钱包余额 */ -export const updateWalletBalance = async (data: any) => { - return await request.put({ url: `/pay/wallet/update-balance`, data }) -} diff --git a/src/api/pay/wallet/rechargePackage/index.ts b/src/api/pay/wallet/rechargePackage/index.ts deleted file mode 100644 index c8e4cc9c..00000000 --- a/src/api/pay/wallet/rechargePackage/index.ts +++ /dev/null @@ -1,34 +0,0 @@ -import request from '@/config/axios' - -export interface WalletRechargePackageVO { - id: number - name: string - payPrice: number - bonusPrice: number - status: number -} - -// 查询套餐充值列表 -export const getWalletRechargePackagePage = async (params) => { - return await request.get({ url: '/pay/wallet-recharge-package/page', params }) -} - -// 查询套餐充值详情 -export const getWalletRechargePackage = async (id: number) => { - return await request.get({ url: '/pay/wallet-recharge-package/get?id=' + id }) -} - -// 新增套餐充值 -export const createWalletRechargePackage = async (data: WalletRechargePackageVO) => { - return await request.post({ url: '/pay/wallet-recharge-package/create', data }) -} - -// 修改套餐充值 -export const updateWalletRechargePackage = async (data: WalletRechargePackageVO) => { - return await request.put({ url: '/pay/wallet-recharge-package/update', data }) -} - -// 删除套餐充值 -export const deleteWalletRechargePackage = async (id: number) => { - return await request.delete({ url: '/pay/wallet-recharge-package/delete?id=' + id }) -} diff --git a/src/api/pay/wallet/transaction/index.ts b/src/api/pay/wallet/transaction/index.ts deleted file mode 100644 index 3377ffaa..00000000 --- a/src/api/pay/wallet/transaction/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -import request from '@/config/axios' - -export interface WalletTransactionVO { - id: number - walletId: number - title: string - price: number - balance: number -} - -// 查询会员钱包流水列表 -export const getWalletTransactionPage = async (params) => { - return await request.get({ url: `/pay/wallet-transaction/page`, params }) -} diff --git a/src/assets/svgs/bpm/add-user.svg b/src/assets/svgs/bpm/add-user.svg deleted file mode 100644 index bc7bdbff..00000000 --- a/src/assets/svgs/bpm/add-user.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/svgs/bpm/approve.svg b/src/assets/svgs/bpm/approve.svg deleted file mode 100644 index 06aa09d6..00000000 --- a/src/assets/svgs/bpm/approve.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/svgs/bpm/auditor.svg b/src/assets/svgs/bpm/auditor.svg deleted file mode 100644 index 66d2c2c0..00000000 --- a/src/assets/svgs/bpm/auditor.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/svgs/bpm/cancel.svg b/src/assets/svgs/bpm/cancel.svg deleted file mode 100644 index 8ff3bba6..00000000 --- a/src/assets/svgs/bpm/cancel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/svgs/bpm/condition.svg b/src/assets/svgs/bpm/condition.svg deleted file mode 100644 index 41ea85dd..00000000 --- a/src/assets/svgs/bpm/condition.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/svgs/bpm/copy.svg b/src/assets/svgs/bpm/copy.svg deleted file mode 100644 index 8ff3bba6..00000000 --- a/src/assets/svgs/bpm/copy.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/svgs/bpm/finish.svg b/src/assets/svgs/bpm/finish.svg deleted file mode 100644 index 674c6df6..00000000 --- a/src/assets/svgs/bpm/finish.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/svgs/bpm/parallel.svg b/src/assets/svgs/bpm/parallel.svg deleted file mode 100644 index ba0ac675..00000000 --- a/src/assets/svgs/bpm/parallel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/svgs/bpm/reject.svg b/src/assets/svgs/bpm/reject.svg deleted file mode 100644 index 21fd5f60..00000000 --- a/src/assets/svgs/bpm/reject.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/svgs/bpm/running.svg b/src/assets/svgs/bpm/running.svg deleted file mode 100644 index 5908c13b..00000000 --- a/src/assets/svgs/bpm/running.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/svgs/bpm/simple-process-bg.svg b/src/assets/svgs/bpm/simple-process-bg.svg deleted file mode 100644 index eb23ab5a..00000000 --- a/src/assets/svgs/bpm/simple-process-bg.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/svgs/bpm/starter.svg b/src/assets/svgs/bpm/starter.svg deleted file mode 100644 index c12c7129..00000000 --- a/src/assets/svgs/bpm/starter.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/components/AppLinkInput/AppLinkSelectDialog.vue b/src/components/AppLinkInput/AppLinkSelectDialog.vue deleted file mode 100644 index 63f19662..00000000 --- a/src/components/AppLinkInput/AppLinkSelectDialog.vue +++ /dev/null @@ -1,207 +0,0 @@ - - - diff --git a/src/components/AppLinkInput/data.ts b/src/components/AppLinkInput/data.ts deleted file mode 100644 index c9e3678a..00000000 --- a/src/components/AppLinkInput/data.ts +++ /dev/null @@ -1,236 +0,0 @@ -// APP 链接分组 -export interface AppLinkGroup { - // 分组名称 - name: string - // 链接列表 - links: AppLink[] -} - -// APP 链接 -export interface AppLink { - // 链接名称 - name: string - // 链接地址 - path: string - // 链接的类型 - type?: APP_LINK_TYPE_ENUM -} - -// APP 链接类型(需要特殊处理,例如商品详情) -export const enum APP_LINK_TYPE_ENUM { - // 拼团活动 - ACTIVITY_COMBINATION, - // 秒杀活动 - ACTIVITY_SECKILL, - // 积分商城活动 - ACTIVITY_POINT, - // 文章详情 - ARTICLE_DETAIL, - // 优惠券详情 - COUPON_DETAIL, - // 自定义页面详情 - DIY_PAGE_DETAIL, - // 品类列表 - PRODUCT_CATEGORY_LIST, - // 商品列表 - PRODUCT_LIST, - // 商品详情 - PRODUCT_DETAIL_NORMAL, - // 拼团商品详情 - PRODUCT_DETAIL_COMBINATION, - // 秒杀商品详情 - PRODUCT_DETAIL_SECKILL -} - -// APP 链接列表(做一下持久化?) -export const APP_LINK_GROUP_LIST = [ - { - name: '商城', - links: [ - { - name: '首页', - path: '/pages/index/index' - }, - { - name: '商品分类', - path: '/pages/index/category', - type: APP_LINK_TYPE_ENUM.PRODUCT_CATEGORY_LIST - }, - { - name: '购物车', - path: '/pages/index/cart' - }, - { - name: '个人中心', - path: '/pages/index/user' - }, - { - name: '商品搜索', - path: '/pages/index/search' - }, - { - name: '自定义页面', - path: '/pages/index/page', - type: APP_LINK_TYPE_ENUM.DIY_PAGE_DETAIL - }, - { - name: '客服', - path: '/pages/chat/index' - }, - { - name: '系统设置', - path: '/pages/public/setting' - }, - { - name: '常见问题', - path: '/pages/public/faq' - } - ] - }, - { - name: '商品', - links: [ - { - name: '商品列表', - path: '/pages/goods/list', - type: APP_LINK_TYPE_ENUM.PRODUCT_LIST - }, - { - name: '商品详情', - path: '/pages/goods/index', - type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_NORMAL - }, - { - name: '拼团商品详情', - path: '/pages/goods/groupon', - type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_COMBINATION - }, - { - name: '秒杀商品详情', - path: '/pages/goods/seckill', - type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_SECKILL - } - ] - }, - { - name: '营销活动', - links: [ - { - name: '拼团订单', - path: '/pages/activity/groupon/order' - }, - { - name: '营销商品', - path: '/pages/activity/index' - }, - { - name: '拼团活动', - path: '/pages/activity/groupon/list', - type: APP_LINK_TYPE_ENUM.ACTIVITY_COMBINATION - }, - { - name: '秒杀活动', - path: '/pages/activity/seckill/list', - type: APP_LINK_TYPE_ENUM.ACTIVITY_SECKILL - }, - { - name: '积分商城活动', - path: '/pages/activity/point/list', - type: APP_LINK_TYPE_ENUM.ACTIVITY_POINT - }, - { - name: '签到中心', - path: '/pages/app/sign' - }, - { - name: '优惠券中心', - path: '/pages/coupon/list' - }, - { - name: '优惠券详情', - path: '/pages/coupon/detail', - type: APP_LINK_TYPE_ENUM.COUPON_DETAIL - }, - { - name: '文章详情', - path: '/pages/public/richtext', - type: APP_LINK_TYPE_ENUM.ARTICLE_DETAIL - } - ] - }, - { - name: '分销商城', - links: [ - { - name: '分销中心', - path: '/pages/commission/index' - }, - { - name: '推广商品', - path: '/pages/commission/goods' - }, - { - name: '分销订单', - path: '/pages/commission/order' - }, - { - name: '我的团队', - path: '/pages/commission/team' - } - ] - }, - { - name: '支付', - links: [ - { - name: '充值余额', - path: '/pages/pay/recharge' - }, - { - name: '充值记录', - path: '/pages/pay/recharge-log' - } - ] - }, - { - name: '用户中心', - links: [ - { - name: '用户信息', - path: '/pages/user/info' - }, - { - name: '用户订单', - path: '/pages/order/list' - }, - { - name: '售后订单', - path: '/pages/order/aftersale/list' - }, - { - name: '商品收藏', - path: '/pages/user/goods-collect' - }, - { - name: '浏览记录', - path: '/pages/user/goods-log' - }, - { - name: '地址管理', - path: '/pages/user/address/list' - }, - { - name: '用户佣金', - path: '/pages/user/wallet/commission' - }, - { - name: '用户余额', - path: '/pages/user/wallet/money' - }, - { - name: '用户积分', - path: '/pages/user/wallet/score' - } - ] - } -] as AppLinkGroup[] diff --git a/src/components/AppLinkInput/index.vue b/src/components/AppLinkInput/index.vue deleted file mode 100644 index ff713821..00000000 --- a/src/components/AppLinkInput/index.vue +++ /dev/null @@ -1,43 +0,0 @@ - - diff --git a/src/components/DiyEditor/components/ComponentContainer.vue b/src/components/DiyEditor/components/ComponentContainer.vue deleted file mode 100644 index 6f2d87c3..00000000 --- a/src/components/DiyEditor/components/ComponentContainer.vue +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - diff --git a/src/components/DiyEditor/components/ComponentContainerProperty.vue b/src/components/DiyEditor/components/ComponentContainerProperty.vue deleted file mode 100644 index 25119a5b..00000000 --- a/src/components/DiyEditor/components/ComponentContainerProperty.vue +++ /dev/null @@ -1,167 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/ComponentLibrary.vue b/src/components/DiyEditor/components/ComponentLibrary.vue deleted file mode 100644 index fd457e0c..00000000 --- a/src/components/DiyEditor/components/ComponentLibrary.vue +++ /dev/null @@ -1,211 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/Carousel/config.ts b/src/components/DiyEditor/components/mobile/Carousel/config.ts deleted file mode 100644 index 3e74a511..00000000 --- a/src/components/DiyEditor/components/mobile/Carousel/config.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' - -/** 轮播图属性 */ -export interface CarouselProperty { - // 类型:默认 | 卡片 - type: 'default' | 'card' - // 指示器样式:点 | 数字 - indicator: 'dot' | 'number' - // 是否自动播放 - autoplay: boolean - // 播放间隔 - interval: number - // 轮播内容 - items: CarouselItemProperty[] - // 组件样式 - style: ComponentStyle -} -// 轮播内容属性 -export interface CarouselItemProperty { - // 类型:图片 | 视频 - type: 'img' | 'video' - // 图片链接 - imgUrl: string - // 视频链接 - videoUrl: string - // 跳转链接 - url: string -} - -// 定义组件 -export const component = { - id: 'Carousel', - name: '轮播图', - icon: 'system-uicons:carousel', - property: { - type: 'default', - indicator: 'dot', - autoplay: false, - interval: 3, - items: [ - { type: 'img', imgUrl: 'https://static.iocoder.cn/mall/banner-01.jpg', videoUrl: '' }, - { type: 'img', imgUrl: 'https://static.iocoder.cn/mall/banner-02.jpg', videoUrl: '' } - ] as CarouselItemProperty[], - style: { - bgType: 'color', - bgColor: '#fff', - marginBottom: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/Carousel/index.vue b/src/components/DiyEditor/components/mobile/Carousel/index.vue deleted file mode 100644 index 360b4a49..00000000 --- a/src/components/DiyEditor/components/mobile/Carousel/index.vue +++ /dev/null @@ -1,43 +0,0 @@ - - - - diff --git a/src/components/DiyEditor/components/mobile/Carousel/property.vue b/src/components/DiyEditor/components/mobile/Carousel/property.vue deleted file mode 100644 index e11b032b..00000000 --- a/src/components/DiyEditor/components/mobile/Carousel/property.vue +++ /dev/null @@ -1,106 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/CouponCard/component.tsx b/src/components/DiyEditor/components/mobile/CouponCard/component.tsx deleted file mode 100644 index 689690b0..00000000 --- a/src/components/DiyEditor/components/mobile/CouponCard/component.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import * as CouponTemplateApi from '@/api/mall/promotion/coupon/couponTemplate' -import { CouponTemplateValidityTypeEnum, PromotionDiscountTypeEnum } from '@/utils/constants' -import { floatToFixed2 } from '@/utils' -import { formatDate } from '@/utils/formatTime' -import { object } from 'vue-types' - -// 优惠值 -export const CouponDiscount = defineComponent({ - name: 'CouponDiscount', - props: { - coupon: object() - }, - setup(props) { - const coupon = props.coupon as CouponTemplateApi.CouponTemplateVO - // 折扣 - let value = coupon.discountPercent + '' - let suffix = ' 折' - // 满减 - if (coupon.discountType === PromotionDiscountTypeEnum.PRICE.type) { - value = floatToFixed2(coupon.discountPrice) - suffix = ' 元' - } - return () => ( -
- {value} - {suffix} -
- ) - } -}) - -// 优惠描述 -export const CouponDiscountDesc = defineComponent({ - name: 'CouponDiscountDesc', - props: { - coupon: object() - }, - setup(props) { - const coupon = props.coupon as CouponTemplateApi.CouponTemplateVO - // 使用条件 - const useCondition = coupon.usePrice > 0 ? `满${floatToFixed2(coupon.usePrice)}元,` : '' - // 优惠描述 - const discountDesc = - coupon.discountType === PromotionDiscountTypeEnum.PRICE.type - ? `减${floatToFixed2(coupon.discountPrice)}元` - : `打${coupon.discountPercent}折` - return () => ( -
- {useCondition} - {discountDesc} -
- ) - } -}) - -// 有效期 -export const CouponValidTerm = defineComponent({ - name: 'CouponValidTerm', - props: { - coupon: object() - }, - setup(props) { - const coupon = props.coupon as CouponTemplateApi.CouponTemplateVO - const text = - coupon.validityType === CouponTemplateValidityTypeEnum.DATE.type - ? `有效期:${formatDate(coupon.validStartTime, 'YYYY-MM-DD')} 至 ${formatDate( - coupon.validEndTime, - 'YYYY-MM-DD' - )}` - : `领取后第 ${coupon.fixedStartTerm} - ${coupon.fixedEndTerm} 天内可用` - return () =>
{text}
- } -}) diff --git a/src/components/DiyEditor/components/mobile/CouponCard/config.ts b/src/components/DiyEditor/components/mobile/CouponCard/config.ts deleted file mode 100644 index 304533d1..00000000 --- a/src/components/DiyEditor/components/mobile/CouponCard/config.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' - -/** 商品卡片属性 */ -export interface CouponCardProperty { - // 列数 - columns: number - // 背景图 - bgImg: string - // 文字颜色 - textColor: string - // 按钮样式 - button: { - // 颜色 - color: string - // 背景颜色 - bgColor: string - } - // 间距 - space: number - // 优惠券编号列表 - couponIds: number[] - // 组件样式 - style: ComponentStyle -} - -// 定义组件 -export const component = { - id: 'CouponCard', - name: '优惠券', - icon: 'ep:ticket', - property: { - columns: 1, - bgImg: '', - textColor: '#E9B461', - button: { - color: '#434343', - bgColor: '' - }, - space: 0, - couponIds: [], - style: { - bgType: 'color', - bgColor: '', - marginBottom: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/CouponCard/index.vue b/src/components/DiyEditor/components/mobile/CouponCard/index.vue deleted file mode 100644 index 3e2302af..00000000 --- a/src/components/DiyEditor/components/mobile/CouponCard/index.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - diff --git a/src/components/DiyEditor/components/mobile/CouponCard/property.vue b/src/components/DiyEditor/components/mobile/CouponCard/property.vue deleted file mode 100644 index 4f69000b..00000000 --- a/src/components/DiyEditor/components/mobile/CouponCard/property.vue +++ /dev/null @@ -1,104 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/Divider/config.ts b/src/components/DiyEditor/components/mobile/Divider/config.ts deleted file mode 100644 index 9b553604..00000000 --- a/src/components/DiyEditor/components/mobile/Divider/config.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { DiyComponent } from '@/components/DiyEditor/util' - -/** 分割线属性 */ -export interface DividerProperty { - // 高度 - height: number - // 线宽 - lineWidth: number - // 边距类型 - paddingType: 'none' | 'horizontal' - // 颜色 - lineColor: string - // 类型 - borderType: 'solid' | 'dashed' | 'dotted' | 'none' -} - -// 定义组件 -export const component = { - id: 'Divider', - name: '分割线', - icon: 'tdesign:component-divider-vertical', - property: { - height: 30, - lineWidth: 1, - paddingType: 'none', - lineColor: '#dcdfe6', - borderType: 'solid' - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/Divider/index.vue b/src/components/DiyEditor/components/mobile/Divider/index.vue deleted file mode 100644 index f7785043..00000000 --- a/src/components/DiyEditor/components/mobile/Divider/index.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/Divider/property.vue b/src/components/DiyEditor/components/mobile/Divider/property.vue deleted file mode 100644 index 0c3cb0e3..00000000 --- a/src/components/DiyEditor/components/mobile/Divider/property.vue +++ /dev/null @@ -1,80 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/FloatingActionButton/config.ts b/src/components/DiyEditor/components/mobile/FloatingActionButton/config.ts deleted file mode 100644 index fcf129f1..00000000 --- a/src/components/DiyEditor/components/mobile/FloatingActionButton/config.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { DiyComponent } from '@/components/DiyEditor/util' - -// 悬浮按钮属性 -export interface FloatingActionButtonProperty { - // 展开方向 - direction: 'horizontal' | 'vertical' - // 是否显示文字 - showText: boolean - // 按钮列表 - list: FloatingActionButtonItemProperty[] -} - -// 悬浮按钮项属性 -export interface FloatingActionButtonItemProperty { - // 图片地址 - imgUrl: string - // 跳转连接 - url: string - // 文字 - text: string - // 文字颜色 - textColor: string -} - -// 定义组件 -export const component = { - id: 'FloatingActionButton', - name: '悬浮按钮', - icon: 'tabler:float-right', - position: 'fixed', - property: { - direction: 'vertical', - showText: true, - list: [{ textColor: '#fff' }] - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/FloatingActionButton/index.vue b/src/components/DiyEditor/components/mobile/FloatingActionButton/index.vue deleted file mode 100644 index ee6c3e20..00000000 --- a/src/components/DiyEditor/components/mobile/FloatingActionButton/index.vue +++ /dev/null @@ -1,74 +0,0 @@ - - - - diff --git a/src/components/DiyEditor/components/mobile/FloatingActionButton/property.vue b/src/components/DiyEditor/components/mobile/FloatingActionButton/property.vue deleted file mode 100644 index df459ffa..00000000 --- a/src/components/DiyEditor/components/mobile/FloatingActionButton/property.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/HotZone/components/HotZoneEditDialog/controller.ts b/src/components/DiyEditor/components/mobile/HotZone/components/HotZoneEditDialog/controller.ts deleted file mode 100644 index a7bd7622..00000000 --- a/src/components/DiyEditor/components/mobile/HotZone/components/HotZoneEditDialog/controller.ts +++ /dev/null @@ -1,143 +0,0 @@ -import { HotZoneItemProperty } from '@/components/DiyEditor/components/mobile/HotZone/config' -import { StyleValue } from 'vue' - -// 热区的最小宽高 -export const HOT_ZONE_MIN_SIZE = 100 - -// 控制的类型 -export enum CONTROL_TYPE_ENUM { - LEFT, - TOP, - WIDTH, - HEIGHT -} - -// 定义热区的控制点 -export interface ControlDot { - position: string - types: CONTROL_TYPE_ENUM[] - style: StyleValue -} - -// 热区的8个控制点 -export const CONTROL_DOT_LIST = [ - { - position: '左上角', - types: [ - CONTROL_TYPE_ENUM.LEFT, - CONTROL_TYPE_ENUM.TOP, - CONTROL_TYPE_ENUM.WIDTH, - CONTROL_TYPE_ENUM.HEIGHT - ], - style: { left: '-5px', top: '-5px', cursor: 'nwse-resize' } - }, - { - position: '上方中间', - types: [CONTROL_TYPE_ENUM.TOP, CONTROL_TYPE_ENUM.HEIGHT], - style: { left: '50%', top: '-5px', cursor: 'n-resize', transform: 'translateX(-50%)' } - }, - { - position: '右上角', - types: [CONTROL_TYPE_ENUM.TOP, CONTROL_TYPE_ENUM.WIDTH, CONTROL_TYPE_ENUM.HEIGHT], - style: { right: '-5px', top: '-5px', cursor: 'nesw-resize' } - }, - { - position: '右侧中间', - types: [CONTROL_TYPE_ENUM.WIDTH], - style: { right: '-5px', top: '50%', cursor: 'e-resize', transform: 'translateX(-50%)' } - }, - { - position: '右下角', - types: [CONTROL_TYPE_ENUM.WIDTH, CONTROL_TYPE_ENUM.HEIGHT], - style: { right: '-5px', bottom: '-5px', cursor: 'nwse-resize' } - }, - { - position: '下方中间', - types: [CONTROL_TYPE_ENUM.HEIGHT], - style: { left: '50%', bottom: '-5px', cursor: 's-resize', transform: 'translateX(-50%)' } - }, - { - position: '左下角', - types: [CONTROL_TYPE_ENUM.LEFT, CONTROL_TYPE_ENUM.WIDTH, CONTROL_TYPE_ENUM.HEIGHT], - style: { left: '-5px', bottom: '-5px', cursor: 'nesw-resize' } - }, - { - position: '左侧中间', - types: [CONTROL_TYPE_ENUM.LEFT, CONTROL_TYPE_ENUM.WIDTH], - style: { left: '-5px', top: '50%', cursor: 'w-resize', transform: 'translateX(-50%)' } - } -] as ControlDot[] - -//region 热区的缩放 -// 热区的缩放比例 -export const HOT_ZONE_SCALE_RATE = 2 -// 缩小:缩回适合手机屏幕的大小 -export const zoomOut = (list?: HotZoneItemProperty[]) => { - return ( - list?.map((hotZone) => ({ - ...hotZone, - left: (hotZone.left /= HOT_ZONE_SCALE_RATE), - top: (hotZone.top /= HOT_ZONE_SCALE_RATE), - width: (hotZone.width /= HOT_ZONE_SCALE_RATE), - height: (hotZone.height /= HOT_ZONE_SCALE_RATE) - })) || [] - ) -} -// 放大:作用是为了方便在电脑屏幕上编辑 -export const zoomIn = (list?: HotZoneItemProperty[]) => { - return ( - list?.map((hotZone) => ({ - ...hotZone, - left: (hotZone.left *= HOT_ZONE_SCALE_RATE), - top: (hotZone.top *= HOT_ZONE_SCALE_RATE), - width: (hotZone.width *= HOT_ZONE_SCALE_RATE), - height: (hotZone.height *= HOT_ZONE_SCALE_RATE) - })) || [] - ) -} -//endregion - -/** - * 封装热区拖拽 - * - * 注:为什么不使用vueuse的useDraggable。在本场景下,其使用方式比较复杂 - * @param hotZone 热区 - * @param downEvent 鼠标按下事件 - * @param callback 回调函数 - */ -export const useDraggable = ( - hotZone: HotZoneItemProperty, - downEvent: MouseEvent, - callback: ( - left: number, - top: number, - width: number, - height: number, - moveWidth: number, - moveHeight: number - ) => void -) => { - // 阻止事件冒泡 - downEvent.stopPropagation() - - // 移动前的鼠标坐标 - const { clientX: startX, clientY: startY } = downEvent - // 移动前的热区坐标、大小 - const { left, top, width, height } = hotZone - - // 监听鼠标移动 - document.onmousemove = (e) => { - // 移动宽度 - const moveWidth = e.clientX - startX - // 移动高度 - const moveHeight = e.clientY - startY - // 移动回调 - callback(left, top, width, height, moveWidth, moveHeight) - } - - // 松开鼠标后,结束拖拽 - document.onmouseup = () => { - document.onmousemove = null - document.onmouseup = null - } -} diff --git a/src/components/DiyEditor/components/mobile/HotZone/components/HotZoneEditDialog/index.vue b/src/components/DiyEditor/components/mobile/HotZone/components/HotZoneEditDialog/index.vue deleted file mode 100644 index a9fc75c8..00000000 --- a/src/components/DiyEditor/components/mobile/HotZone/components/HotZoneEditDialog/index.vue +++ /dev/null @@ -1,236 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/HotZone/config.ts b/src/components/DiyEditor/components/mobile/HotZone/config.ts deleted file mode 100644 index 80ed8559..00000000 --- a/src/components/DiyEditor/components/mobile/HotZone/config.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' - -/** 热区属性 */ -export interface HotZoneProperty { - // 图片地址 - imgUrl: string - // 导航菜单列表 - list: HotZoneItemProperty[] - // 组件样式 - style: ComponentStyle -} - -/** 热区项目属性 */ -export interface HotZoneItemProperty { - // 链接的名称 - name: string - // 链接 - url: string - // 宽 - width: number - // 高 - height: number - // 上 - top: number - // 左 - left: number -} - -// 定义组件 -export const component = { - id: 'HotZone', - name: '热区', - icon: 'tabler:hand-click', - property: { - imgUrl: '', - list: [] as HotZoneItemProperty[], - style: { - bgType: 'color', - bgColor: '#fff', - marginBottom: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/HotZone/index.vue b/src/components/DiyEditor/components/mobile/HotZone/index.vue deleted file mode 100644 index 4360e8ab..00000000 --- a/src/components/DiyEditor/components/mobile/HotZone/index.vue +++ /dev/null @@ -1,42 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/HotZone/property.vue b/src/components/DiyEditor/components/mobile/HotZone/property.vue deleted file mode 100644 index 4f6c3b64..00000000 --- a/src/components/DiyEditor/components/mobile/HotZone/property.vue +++ /dev/null @@ -1,63 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/ImageBar/config.ts b/src/components/DiyEditor/components/mobile/ImageBar/config.ts deleted file mode 100644 index 68edf728..00000000 --- a/src/components/DiyEditor/components/mobile/ImageBar/config.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' - -/** 图片展示属性 */ -export interface ImageBarProperty { - // 图片链接 - imgUrl: string - // 跳转链接 - url: string - // 组件样式 - style: ComponentStyle -} - -// 定义组件 -export const component = { - id: 'ImageBar', - name: '图片展示', - icon: 'ep:picture', - property: { - imgUrl: '', - url: '', - style: { - bgType: 'color', - bgColor: '#fff', - marginBottom: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/ImageBar/index.vue b/src/components/DiyEditor/components/mobile/ImageBar/index.vue deleted file mode 100644 index d9685b50..00000000 --- a/src/components/DiyEditor/components/mobile/ImageBar/index.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - - diff --git a/src/components/DiyEditor/components/mobile/ImageBar/property.vue b/src/components/DiyEditor/components/mobile/ImageBar/property.vue deleted file mode 100644 index d8163615..00000000 --- a/src/components/DiyEditor/components/mobile/ImageBar/property.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/MagicCube/config.ts b/src/components/DiyEditor/components/mobile/MagicCube/config.ts deleted file mode 100644 index 5e10ab55..00000000 --- a/src/components/DiyEditor/components/mobile/MagicCube/config.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' - -/** 广告魔方属性 */ -export interface MagicCubeProperty { - // 上圆角 - borderRadiusTop: number - // 下圆角 - borderRadiusBottom: number - // 间隔 - space: number - // 导航菜单列表 - list: MagicCubeItemProperty[] - // 组件样式 - style: ComponentStyle -} - -/** 广告魔方项目属性 */ -export interface MagicCubeItemProperty { - // 图标链接 - imgUrl: string - // 链接 - url: string - // 宽 - width: number - // 高 - height: number - // 上 - top: number - // 左 - left: number -} - -// 定义组件 -export const component = { - id: 'MagicCube', - name: '广告魔方', - icon: 'bi:columns', - property: { - borderRadiusTop: 0, - borderRadiusBottom: 0, - space: 0, - list: [], - style: { - bgType: 'color', - bgColor: '#fff', - marginBottom: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/MagicCube/index.vue b/src/components/DiyEditor/components/mobile/MagicCube/index.vue deleted file mode 100644 index 48fb6c75..00000000 --- a/src/components/DiyEditor/components/mobile/MagicCube/index.vue +++ /dev/null @@ -1,73 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/MagicCube/property.vue b/src/components/DiyEditor/components/mobile/MagicCube/property.vue deleted file mode 100644 index fe938e5b..00000000 --- a/src/components/DiyEditor/components/mobile/MagicCube/property.vue +++ /dev/null @@ -1,76 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/MenuGrid/config.ts b/src/components/DiyEditor/components/mobile/MenuGrid/config.ts deleted file mode 100644 index 9f91ceb0..00000000 --- a/src/components/DiyEditor/components/mobile/MenuGrid/config.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' -import { cloneDeep } from 'lodash-es' - -/** 宫格导航属性 */ -export interface MenuGridProperty { - // 列数 - column: number - // 导航菜单列表 - list: MenuGridItemProperty[] - // 组件样式 - style: ComponentStyle -} - -/** 宫格导航项目属性 */ -export interface MenuGridItemProperty { - // 图标链接 - iconUrl: string - // 标题 - title: string - // 标题颜色 - titleColor: string - // 副标题 - subtitle: string - // 副标题颜色 - subtitleColor: string - // 链接 - url: string - // 角标 - badge: { - // 是否显示 - show: boolean - // 角标文字 - text: string - // 角标文字颜色 - textColor: string - // 角标背景颜色 - bgColor: string - } -} - -export const EMPTY_MENU_GRID_ITEM_PROPERTY = { - title: '标题', - titleColor: '#333', - subtitle: '副标题', - subtitleColor: '#bbb', - badge: { - show: false, - textColor: '#fff', - bgColor: '#FF6000' - } -} as MenuGridItemProperty - -// 定义组件 -export const component = { - id: 'MenuGrid', - name: '宫格导航', - icon: 'bi:grid-3x3-gap', - property: { - column: 3, - list: [cloneDeep(EMPTY_MENU_GRID_ITEM_PROPERTY)], - style: { - bgType: 'color', - bgColor: '#fff', - marginBottom: 8, - marginLeft: 8, - marginRight: 8, - padding: 8, - paddingTop: 8, - paddingRight: 8, - paddingBottom: 8, - paddingLeft: 8, - borderRadius: 8, - borderTopLeftRadius: 8, - borderTopRightRadius: 8, - borderBottomRightRadius: 8, - borderBottomLeftRadius: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/MenuGrid/index.vue b/src/components/DiyEditor/components/mobile/MenuGrid/index.vue deleted file mode 100644 index 1c5ef1dc..00000000 --- a/src/components/DiyEditor/components/mobile/MenuGrid/index.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/MenuGrid/property.vue b/src/components/DiyEditor/components/mobile/MenuGrid/property.vue deleted file mode 100644 index bb944c99..00000000 --- a/src/components/DiyEditor/components/mobile/MenuGrid/property.vue +++ /dev/null @@ -1,65 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/MenuList/config.ts b/src/components/DiyEditor/components/mobile/MenuList/config.ts deleted file mode 100644 index f96fd0a1..00000000 --- a/src/components/DiyEditor/components/mobile/MenuList/config.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' -import { cloneDeep } from 'lodash-es' - -/** 列表导航属性 */ -export interface MenuListProperty { - // 导航菜单列表 - list: MenuListItemProperty[] - // 组件样式 - style: ComponentStyle -} - -/** 列表导航项目属性 */ -export interface MenuListItemProperty { - // 图标链接 - iconUrl: string - // 标题 - title: string - // 标题颜色 - titleColor: string - // 副标题 - subtitle: string - // 副标题颜色 - subtitleColor: string - // 链接 - url: string -} - -export const EMPTY_MENU_LIST_ITEM_PROPERTY = { - title: '标题', - titleColor: '#333', - subtitle: '副标题', - subtitleColor: '#bbb' -} - -// 定义组件 -export const component = { - id: 'MenuList', - name: '列表导航', - icon: 'fa-solid:list', - property: { - list: [cloneDeep(EMPTY_MENU_LIST_ITEM_PROPERTY)], - style: { - bgType: 'color', - bgColor: '#fff', - marginBottom: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/MenuList/index.vue b/src/components/DiyEditor/components/mobile/MenuList/index.vue deleted file mode 100644 index 9a56fd94..00000000 --- a/src/components/DiyEditor/components/mobile/MenuList/index.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/MenuList/property.vue b/src/components/DiyEditor/components/mobile/MenuList/property.vue deleted file mode 100644 index a5fb4603..00000000 --- a/src/components/DiyEditor/components/mobile/MenuList/property.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/MenuSwiper/config.ts b/src/components/DiyEditor/components/mobile/MenuSwiper/config.ts deleted file mode 100644 index fe5f4e87..00000000 --- a/src/components/DiyEditor/components/mobile/MenuSwiper/config.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' -import { cloneDeep } from 'lodash-es' - -/** 菜单导航属性 */ -export interface MenuSwiperProperty { - // 布局: 图标+文字 | 图标 - layout: 'iconText' | 'icon' - // 行数 - row: number - // 列数 - column: number - // 导航菜单列表 - list: MenuSwiperItemProperty[] - // 组件样式 - style: ComponentStyle -} -/** 菜单导航项目属性 */ -export interface MenuSwiperItemProperty { - // 图标链接 - iconUrl: string - // 标题 - title: string - // 标题颜色 - titleColor: string - // 链接 - url: string - // 角标 - badge: { - // 是否显示 - show: boolean - // 角标文字 - text: string - // 角标文字颜色 - textColor: string - // 角标背景颜色 - bgColor: string - } -} - -export const EMPTY_MENU_SWIPER_ITEM_PROPERTY = { - title: '标题', - titleColor: '#333', - badge: { - show: false, - textColor: '#fff', - bgColor: '#FF6000' - } -} as MenuSwiperItemProperty - -// 定义组件 -export const component = { - id: 'MenuSwiper', - name: '菜单导航', - icon: 'bi:grid-3x2-gap', - property: { - layout: 'iconText', - row: 1, - column: 3, - list: [cloneDeep(EMPTY_MENU_SWIPER_ITEM_PROPERTY)], - style: { - bgType: 'color', - bgColor: '#fff', - marginBottom: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/MenuSwiper/index.vue b/src/components/DiyEditor/components/mobile/MenuSwiper/index.vue deleted file mode 100644 index c2319daf..00000000 --- a/src/components/DiyEditor/components/mobile/MenuSwiper/index.vue +++ /dev/null @@ -1,122 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/MenuSwiper/property.vue b/src/components/DiyEditor/components/mobile/MenuSwiper/property.vue deleted file mode 100644 index fbae83c2..00000000 --- a/src/components/DiyEditor/components/mobile/MenuSwiper/property.vue +++ /dev/null @@ -1,76 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/NavigationBar/components/CellProperty.vue b/src/components/DiyEditor/components/mobile/NavigationBar/components/CellProperty.vue deleted file mode 100644 index 2c3bd541..00000000 --- a/src/components/DiyEditor/components/mobile/NavigationBar/components/CellProperty.vue +++ /dev/null @@ -1,90 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/NavigationBar/config.ts b/src/components/DiyEditor/components/mobile/NavigationBar/config.ts deleted file mode 100644 index 36612a3f..00000000 --- a/src/components/DiyEditor/components/mobile/NavigationBar/config.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { DiyComponent } from '@/components/DiyEditor/util' - -/** 顶部导航栏属性 */ -export interface NavigationBarProperty { - // 背景类型 - bgType: 'color' | 'img' - // 背景颜色 - bgColor: string - // 图片链接 - bgImg: string - // 样式类型:默认 | 沉浸式 - styleType: 'normal' | 'inner' - // 常驻显示 - alwaysShow: boolean - // 小程序单元格列表 - mpCells: NavigationBarCellProperty[] - // 其它平台单元格列表 - otherCells: NavigationBarCellProperty[] - // 本地变量 - _local: { - // 预览顶部导航(小程序) - previewMp: boolean - // 预览顶部导航(非小程序) - previewOther: boolean - } -} - -/** 顶部导航栏 - 单元格 属性 */ -export interface NavigationBarCellProperty { - // 类型:文字 | 图片 | 搜索框 - type: 'text' | 'image' | 'search' - // 宽度 - width: number - // 高度 - height: number - // 顶部位置 - top: number - // 左侧位置 - left: number - // 文字内容 - text: string - // 文字颜色 - textColor: string - // 图片地址 - imgUrl: string - // 图片链接 - url: string - // 搜索框:提示文字 - placeholder: string - // 搜索框:边框圆角半径 - borderRadius: number -} - -// 定义组件 -export const component = { - id: 'NavigationBar', - name: '顶部导航栏', - icon: 'tabler:layout-navbar', - property: { - bgType: 'color', - bgColor: '#fff', - bgImg: '', - styleType: 'normal', - alwaysShow: true, - mpCells: [ - { - type: 'text', - textColor: '#111111' - } - ], - otherCells: [ - { - type: 'text', - textColor: '#111111' - } - ], - _local: { - previewMp: true, - previewOther: false - } - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/NavigationBar/index.vue b/src/components/DiyEditor/components/mobile/NavigationBar/index.vue deleted file mode 100644 index ab179cd7..00000000 --- a/src/components/DiyEditor/components/mobile/NavigationBar/index.vue +++ /dev/null @@ -1,90 +0,0 @@ - - - diff --git a/src/components/DiyEditor/components/mobile/NavigationBar/property.vue b/src/components/DiyEditor/components/mobile/NavigationBar/property.vue deleted file mode 100644 index 5b067728..00000000 --- a/src/components/DiyEditor/components/mobile/NavigationBar/property.vue +++ /dev/null @@ -1,86 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/NoticeBar/config.ts b/src/components/DiyEditor/components/mobile/NoticeBar/config.ts deleted file mode 100644 index b6b0860d..00000000 --- a/src/components/DiyEditor/components/mobile/NoticeBar/config.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' - -/** 公告栏属性 */ -export interface NoticeBarProperty { - // 图标地址 - iconUrl: string - // 公告内容列表 - contents: NoticeContentProperty[] - // 背景颜色 - backgroundColor: string - // 文字颜色 - textColor: string - // 组件样式 - style: ComponentStyle -} - -/** 内容属性 */ -export interface NoticeContentProperty { - // 内容文字 - text: string - // 链接地址 - url: string -} - -// 定义组件 -export const component = { - id: 'NoticeBar', - name: '公告栏', - icon: 'ep:bell', - property: { - iconUrl: 'http://mall.yudao.iocoder.cn/static/images/xinjian.png', - contents: [ - { - text: '', - url: '' - } - ], - backgroundColor: '#fff', - textColor: '#333', - style: { - bgType: 'color', - bgColor: '#fff', - marginBottom: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/NoticeBar/index.vue b/src/components/DiyEditor/components/mobile/NoticeBar/index.vue deleted file mode 100644 index fce1afbb..00000000 --- a/src/components/DiyEditor/components/mobile/NoticeBar/index.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/NoticeBar/property.vue b/src/components/DiyEditor/components/mobile/NoticeBar/property.vue deleted file mode 100644 index a505011a..00000000 --- a/src/components/DiyEditor/components/mobile/NoticeBar/property.vue +++ /dev/null @@ -1,46 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/PageConfig/config.ts b/src/components/DiyEditor/components/mobile/PageConfig/config.ts deleted file mode 100644 index f8e45e45..00000000 --- a/src/components/DiyEditor/components/mobile/PageConfig/config.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { DiyComponent } from '@/components/DiyEditor/util' - -/** 页面设置属性 */ -export interface PageConfigProperty { - // 页面描述 - description: string - // 页面背景颜色 - backgroundColor: string - // 页面背景图片 - backgroundImage: string -} - -// 定义页面组件 -export const component = { - id: 'PageConfig', - name: '页面设置', - icon: 'ep:document', - property: { - description: '', - backgroundColor: '#f5f5f5', - backgroundImage: '' - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/PageConfig/property.vue b/src/components/DiyEditor/components/mobile/PageConfig/property.vue deleted file mode 100644 index 278bc940..00000000 --- a/src/components/DiyEditor/components/mobile/PageConfig/property.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/Popover/config.ts b/src/components/DiyEditor/components/mobile/Popover/config.ts deleted file mode 100644 index e8140900..00000000 --- a/src/components/DiyEditor/components/mobile/Popover/config.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { DiyComponent } from '@/components/DiyEditor/util' - -/** 弹窗广告属性 */ -export interface PopoverProperty { - list: PopoverItemProperty[] -} - -export interface PopoverItemProperty { - // 图片地址 - imgUrl: string - // 跳转连接 - url: string - // 显示类型:仅显示一次、每次启动都会显示 - showType: 'once' | 'always' -} - -// 定义组件 -export const component = { - id: 'Popover', - name: '弹窗广告', - icon: 'carbon:popup', - position: 'fixed', - property: { - list: [{ showType: 'once' }] - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/Popover/index.vue b/src/components/DiyEditor/components/mobile/Popover/index.vue deleted file mode 100644 index 347599b3..00000000 --- a/src/components/DiyEditor/components/mobile/Popover/index.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - diff --git a/src/components/DiyEditor/components/mobile/Popover/property.vue b/src/components/DiyEditor/components/mobile/Popover/property.vue deleted file mode 100644 index 2dd43519..00000000 --- a/src/components/DiyEditor/components/mobile/Popover/property.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/ProductCard/config.ts b/src/components/DiyEditor/components/mobile/ProductCard/config.ts deleted file mode 100644 index 735b6ba0..00000000 --- a/src/components/DiyEditor/components/mobile/ProductCard/config.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' - -/** 商品卡片属性 */ -export interface ProductCardProperty { - // 布局类型:单列大图 | 单列小图 | 双列 - layoutType: 'oneColBigImg' | 'oneColSmallImg' | 'twoCol' - // 商品字段 - fields: { - // 商品名称 - name: ProductCardFieldProperty - // 商品简介 - introduction: ProductCardFieldProperty - // 商品价格 - price: ProductCardFieldProperty - // 商品市场价 - marketPrice: ProductCardFieldProperty - // 商品销量 - salesCount: ProductCardFieldProperty - // 商品库存 - stock: ProductCardFieldProperty - } - // 角标 - badge: { - // 是否显示 - show: boolean - // 角标图片 - imgUrl: string - } - // 按钮 - btnBuy: { - // 类型:文字 | 图片 - type: 'text' | 'img' - // 文字 - text: string - // 文字按钮:背景渐变起始颜色 - bgBeginColor: string - // 文字按钮:背景渐变结束颜色 - bgEndColor: string - // 图片按钮:图片地址 - imgUrl: string - } - // 上圆角 - borderRadiusTop: number - // 下圆角 - borderRadiusBottom: number - // 间距 - space: number - // 商品编号列表 - spuIds: number[] - // 组件样式 - style: ComponentStyle -} -// 商品字段 -export interface ProductCardFieldProperty { - // 是否显示 - show: boolean - // 颜色 - color: string -} - -// 定义组件 -export const component = { - id: 'ProductCard', - name: '商品卡片', - icon: 'fluent:text-column-two-left-24-filled', - property: { - layoutType: 'oneColBigImg', - fields: { - name: { show: true, color: '#000' }, - introduction: { show: true, color: '#999' }, - price: { show: true, color: '#ff3000' }, - marketPrice: { show: true, color: '#c4c4c4' }, - salesCount: { show: true, color: '#c4c4c4' }, - stock: { show: false, color: '#c4c4c4' } - }, - badge: { show: false, imgUrl: '' }, - btnBuy: { - type: 'text', - text: '立即购买', - // todo: @owen 根据主题色配置 - bgBeginColor: '#FF6000', - bgEndColor: '#FE832A', - imgUrl: '' - }, - borderRadiusTop: 8, - borderRadiusBottom: 8, - space: 8, - spuIds: [], - style: { - bgType: 'color', - bgColor: '', - marginLeft: 8, - marginRight: 8, - marginBottom: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/ProductCard/index.vue b/src/components/DiyEditor/components/mobile/ProductCard/index.vue deleted file mode 100644 index 25f8cb87..00000000 --- a/src/components/DiyEditor/components/mobile/ProductCard/index.vue +++ /dev/null @@ -1,167 +0,0 @@ - - - - diff --git a/src/components/DiyEditor/components/mobile/ProductCard/property.vue b/src/components/DiyEditor/components/mobile/ProductCard/property.vue deleted file mode 100644 index 110c8be9..00000000 --- a/src/components/DiyEditor/components/mobile/ProductCard/property.vue +++ /dev/null @@ -1,149 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/ProductList/config.ts b/src/components/DiyEditor/components/mobile/ProductList/config.ts deleted file mode 100644 index 1f168323..00000000 --- a/src/components/DiyEditor/components/mobile/ProductList/config.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' - -/** 商品栏属性 */ -export interface ProductListProperty { - // 布局类型:双列 | 三列 | 水平滑动 - layoutType: 'twoCol' | 'threeCol' | 'horizSwiper' - // 商品字段 - fields: { - // 商品名称 - name: ProductListFieldProperty - // 商品价格 - price: ProductListFieldProperty - } - // 角标 - badge: { - // 是否显示 - show: boolean - // 角标图片 - imgUrl: string - } - // 上圆角 - borderRadiusTop: number - // 下圆角 - borderRadiusBottom: number - // 间距 - space: number - // 商品编号列表 - spuIds: number[] - // 组件样式 - style: ComponentStyle -} -// 商品字段 -export interface ProductListFieldProperty { - // 是否显示 - show: boolean - // 颜色 - color: string -} - -// 定义组件 -export const component = { - id: 'ProductList', - name: '商品栏', - icon: 'fluent:text-column-two-24-filled', - property: { - layoutType: 'twoCol', - fields: { - name: { show: true, color: '#000' }, - price: { show: true, color: '#ff3000' } - }, - badge: { show: false, imgUrl: '' }, - borderRadiusTop: 8, - borderRadiusBottom: 8, - space: 8, - spuIds: [], - style: { - bgType: 'color', - bgColor: '', - marginLeft: 8, - marginRight: 8, - marginBottom: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/ProductList/index.vue b/src/components/DiyEditor/components/mobile/ProductList/index.vue deleted file mode 100644 index a51fc076..00000000 --- a/src/components/DiyEditor/components/mobile/ProductList/index.vue +++ /dev/null @@ -1,132 +0,0 @@ - - - - diff --git a/src/components/DiyEditor/components/mobile/ProductList/property.vue b/src/components/DiyEditor/components/mobile/ProductList/property.vue deleted file mode 100644 index 894687c2..00000000 --- a/src/components/DiyEditor/components/mobile/ProductList/property.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/PromotionArticle/config.ts b/src/components/DiyEditor/components/mobile/PromotionArticle/config.ts deleted file mode 100644 index c6270c2a..00000000 --- a/src/components/DiyEditor/components/mobile/PromotionArticle/config.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' - -/** 营销文章属性 */ -export interface PromotionArticleProperty { - // 文章编号 - id: number - // 组件样式 - style: ComponentStyle -} - -// 定义组件 -export const component = { - id: 'PromotionArticle', - name: '营销文章', - icon: 'ph:article-medium', - property: { - style: { - bgType: 'color', - bgColor: '', - marginLeft: 8, - marginRight: 8, - marginBottom: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/PromotionArticle/index.vue b/src/components/DiyEditor/components/mobile/PromotionArticle/index.vue deleted file mode 100644 index e003b081..00000000 --- a/src/components/DiyEditor/components/mobile/PromotionArticle/index.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - - diff --git a/src/components/DiyEditor/components/mobile/PromotionArticle/property.vue b/src/components/DiyEditor/components/mobile/PromotionArticle/property.vue deleted file mode 100644 index c3bcb21b..00000000 --- a/src/components/DiyEditor/components/mobile/PromotionArticle/property.vue +++ /dev/null @@ -1,56 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/PromotionCombination/config.ts b/src/components/DiyEditor/components/mobile/PromotionCombination/config.ts deleted file mode 100644 index f4fdf6e8..00000000 --- a/src/components/DiyEditor/components/mobile/PromotionCombination/config.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' - -/** 拼团属性 */ -export interface PromotionCombinationProperty { - // 布局类型:单列 | 三列 - layoutType: 'oneColBigImg' | 'oneColSmallImg' | 'twoCol' - // 商品字段 - fields: { - // 商品名称 - name: PromotionCombinationFieldProperty - // 商品简介 - introduction: PromotionCombinationFieldProperty - // 商品价格 - price: PromotionCombinationFieldProperty - // 市场价 - marketPrice: PromotionCombinationFieldProperty - // 商品销量 - salesCount: PromotionCombinationFieldProperty - // 商品库存 - stock: PromotionCombinationFieldProperty - } - // 角标 - badge: { - // 是否显示 - show: boolean - // 角标图片 - imgUrl: string - } - // 按钮 - btnBuy: { - // 类型:文字 | 图片 - type: 'text' | 'img' - // 文字 - text: string - // 文字按钮:背景渐变起始颜色 - bgBeginColor: string - // 文字按钮:背景渐变结束颜色 - bgEndColor: string - // 图片按钮:图片地址 - imgUrl: string - } - // 上圆角 - borderRadiusTop: number - // 下圆角 - borderRadiusBottom: number - // 间距 - space: number - // 拼团活动编号 - activityIds: number[] - // 组件样式 - style: ComponentStyle -} - -// 商品字段 -export interface PromotionCombinationFieldProperty { - // 是否显示 - show: boolean - // 颜色 - color: string -} - -// 定义组件 -export const component = { - id: 'PromotionCombination', - name: '拼团', - icon: 'mdi:account-group', - property: { - layoutType: 'oneColBigImg', - fields: { - name: { show: true, color: '#000' }, - introduction: { show: true, color: '#999' }, - price: { show: true, color: '#ff3000' }, - marketPrice: { show: true, color: '#c4c4c4' }, - salesCount: { show: true, color: '#c4c4c4' }, - stock: { show: false, color: '#c4c4c4' } - }, - badge: { show: false, imgUrl: '' }, - btnBuy: { - type: 'text', - text: '去拼团', - bgBeginColor: '#FF6000', - bgEndColor: '#FE832A', - imgUrl: '' - }, - borderRadiusTop: 8, - borderRadiusBottom: 8, - space: 8, - style: { - bgType: 'color', - bgColor: '', - marginLeft: 8, - marginRight: 8, - marginBottom: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/PromotionCombination/index.vue b/src/components/DiyEditor/components/mobile/PromotionCombination/index.vue deleted file mode 100644 index d41bf1c1..00000000 --- a/src/components/DiyEditor/components/mobile/PromotionCombination/index.vue +++ /dev/null @@ -1,201 +0,0 @@ - - - - diff --git a/src/components/DiyEditor/components/mobile/PromotionCombination/property.vue b/src/components/DiyEditor/components/mobile/PromotionCombination/property.vue deleted file mode 100644 index ea901a0f..00000000 --- a/src/components/DiyEditor/components/mobile/PromotionCombination/property.vue +++ /dev/null @@ -1,164 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/PromotionPoint/config.ts b/src/components/DiyEditor/components/mobile/PromotionPoint/config.ts deleted file mode 100644 index 75aa0ffb..00000000 --- a/src/components/DiyEditor/components/mobile/PromotionPoint/config.ts +++ /dev/null @@ -1,96 +0,0 @@ -import {ComponentStyle, DiyComponent} from '@/components/DiyEditor/util' - -/** 积分商城属性 */ -export interface PromotionPointProperty { - // 布局类型:单列 | 三列 - layoutType: 'oneColBigImg' | 'oneColSmallImg' | 'twoCol' - // 商品字段 - fields: { - // 商品名称 - name: PromotionPointFieldProperty - // 商品简介 - introduction: PromotionPointFieldProperty - // 商品价格 - price: PromotionPointFieldProperty - // 市场价 - marketPrice: PromotionPointFieldProperty - // 商品销量 - salesCount: PromotionPointFieldProperty - // 商品库存 - stock: PromotionPointFieldProperty - } - // 角标 - badge: { - // 是否显示 - show: boolean - // 角标图片 - imgUrl: string - } - // 按钮 - btnBuy: { - // 类型:文字 | 图片 - type: 'text' | 'img' - // 文字 - text: string - // 文字按钮:背景渐变起始颜色 - bgBeginColor: string - // 文字按钮:背景渐变结束颜色 - bgEndColor: string - // 图片按钮:图片地址 - imgUrl: string - } - // 上圆角 - borderRadiusTop: number - // 下圆角 - borderRadiusBottom: number - // 间距 - space: number - // 秒杀活动编号 - activityIds: number[] - // 组件样式 - style: ComponentStyle -} - -// 商品字段 -export interface PromotionPointFieldProperty { - // 是否显示 - show: boolean - // 颜色 - color: string -} - -// 定义组件 -export const component = { - id: 'PromotionPoint', - name: '积分商城', - icon: 'ep:present', - property: { - layoutType: 'oneColBigImg', - fields: { - name: { show: true, color: '#000' }, - introduction: { show: true, color: '#999' }, - price: { show: true, color: '#ff3000' }, - marketPrice: { show: true, color: '#c4c4c4' }, - salesCount: { show: true, color: '#c4c4c4' }, - stock: { show: false, color: '#c4c4c4' } - }, - badge: { show: false, imgUrl: '' }, - btnBuy: { - type: 'text', - text: '立即兑换', - bgBeginColor: '#FF6000', - bgEndColor: '#FE832A', - imgUrl: '' - }, - borderRadiusTop: 8, - borderRadiusBottom: 8, - space: 8, - style: { - bgType: 'color', - bgColor: '', - marginLeft: 8, - marginRight: 8, - marginBottom: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/PromotionPoint/index.vue b/src/components/DiyEditor/components/mobile/PromotionPoint/index.vue deleted file mode 100644 index 4acd93fc..00000000 --- a/src/components/DiyEditor/components/mobile/PromotionPoint/index.vue +++ /dev/null @@ -1,202 +0,0 @@ - - - - diff --git a/src/components/DiyEditor/components/mobile/PromotionPoint/property.vue b/src/components/DiyEditor/components/mobile/PromotionPoint/property.vue deleted file mode 100644 index 84a429b6..00000000 --- a/src/components/DiyEditor/components/mobile/PromotionPoint/property.vue +++ /dev/null @@ -1,154 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/PromotionSeckill/config.ts b/src/components/DiyEditor/components/mobile/PromotionSeckill/config.ts deleted file mode 100644 index 022be92c..00000000 --- a/src/components/DiyEditor/components/mobile/PromotionSeckill/config.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' - -/** 秒杀属性 */ -export interface PromotionSeckillProperty { - // 布局类型:单列 | 三列 - layoutType: 'oneColBigImg' | 'oneColSmallImg' | 'twoCol' - // 商品字段 - fields: { - // 商品名称 - name: PromotionSeckillFieldProperty - // 商品简介 - introduction: PromotionSeckillFieldProperty - // 商品价格 - price: PromotionSeckillFieldProperty - // 市场价 - marketPrice: PromotionSeckillFieldProperty - // 商品销量 - salesCount: PromotionSeckillFieldProperty - // 商品库存 - stock: PromotionSeckillFieldProperty - } - // 角标 - badge: { - // 是否显示 - show: boolean - // 角标图片 - imgUrl: string - } - // 按钮 - btnBuy: { - // 类型:文字 | 图片 - type: 'text' | 'img' - // 文字 - text: string - // 文字按钮:背景渐变起始颜色 - bgBeginColor: string - // 文字按钮:背景渐变结束颜色 - bgEndColor: string - // 图片按钮:图片地址 - imgUrl: string - } - // 上圆角 - borderRadiusTop: number - // 下圆角 - borderRadiusBottom: number - // 间距 - space: number - // 秒杀活动编号 - activityIds: number[] - // 组件样式 - style: ComponentStyle -} - -// 商品字段 -export interface PromotionSeckillFieldProperty { - // 是否显示 - show: boolean - // 颜色 - color: string -} - -// 定义组件 -export const component = { - id: 'PromotionSeckill', - name: '秒杀', - icon: 'mdi:calendar-time', - property: { - layoutType: 'oneColBigImg', - fields: { - name: { show: true, color: '#000' }, - introduction: { show: true, color: '#999' }, - price: { show: true, color: '#ff3000' }, - marketPrice: { show: true, color: '#c4c4c4' }, - salesCount: { show: true, color: '#c4c4c4' }, - stock: { show: false, color: '#c4c4c4' } - }, - badge: { show: false, imgUrl: '' }, - btnBuy: { - type: 'text', - text: '立即秒杀', - bgBeginColor: '#FF6000', - bgEndColor: '#FE832A', - imgUrl: '' - }, - borderRadiusTop: 8, - borderRadiusBottom: 8, - space: 8, - style: { - bgType: 'color', - bgColor: '', - marginLeft: 8, - marginRight: 8, - marginBottom: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/PromotionSeckill/index.vue b/src/components/DiyEditor/components/mobile/PromotionSeckill/index.vue deleted file mode 100644 index 3d34a3d4..00000000 --- a/src/components/DiyEditor/components/mobile/PromotionSeckill/index.vue +++ /dev/null @@ -1,201 +0,0 @@ - - - - diff --git a/src/components/DiyEditor/components/mobile/PromotionSeckill/property.vue b/src/components/DiyEditor/components/mobile/PromotionSeckill/property.vue deleted file mode 100644 index 61287590..00000000 --- a/src/components/DiyEditor/components/mobile/PromotionSeckill/property.vue +++ /dev/null @@ -1,164 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/SearchBar/config.ts b/src/components/DiyEditor/components/mobile/SearchBar/config.ts deleted file mode 100644 index ef47b27c..00000000 --- a/src/components/DiyEditor/components/mobile/SearchBar/config.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' - -/** 搜索框属性 */ -export interface SearchProperty { - height: number // 搜索栏高度 - showScan: boolean // 显示扫一扫 - borderRadius: number // 框体样式 - placeholder: string // 占位文字 - placeholderPosition: PlaceholderPosition // 占位文字位置 - backgroundColor: string // 框体颜色 - textColor: string // 字体颜色 - hotKeywords: string[] // 热词 - style: ComponentStyle -} - -// 文字位置 -export type PlaceholderPosition = 'left' | 'center' - -// 定义组件 -export const component = { - id: 'SearchBar', - name: '搜索框', - icon: 'ep:search', - property: { - height: 28, - showScan: false, - borderRadius: 0, - placeholder: '搜索商品', - placeholderPosition: 'left', - backgroundColor: 'rgb(238, 238, 238)', - textColor: 'rgb(150, 151, 153)', - hotKeywords: [], - style: { - bgType: 'color', - bgColor: '#fff', - marginBottom: 8, - paddingTop: 8, - paddingRight: 8, - paddingBottom: 8, - paddingLeft: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/SearchBar/index.vue b/src/components/DiyEditor/components/mobile/SearchBar/index.vue deleted file mode 100644 index 9de261ad..00000000 --- a/src/components/DiyEditor/components/mobile/SearchBar/index.vue +++ /dev/null @@ -1,75 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/SearchBar/property.vue b/src/components/DiyEditor/components/mobile/SearchBar/property.vue deleted file mode 100644 index 71f94933..00000000 --- a/src/components/DiyEditor/components/mobile/SearchBar/property.vue +++ /dev/null @@ -1,73 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/TabBar/config.ts b/src/components/DiyEditor/components/mobile/TabBar/config.ts deleted file mode 100644 index 88d706fe..00000000 --- a/src/components/DiyEditor/components/mobile/TabBar/config.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { DiyComponent } from '@/components/DiyEditor/util' - -/** 底部导航菜单属性 */ -export interface TabBarProperty { - // 选项列表 - items: TabBarItemProperty[] - // 主题 - theme: string - // 样式 - style: TabBarStyle -} - -// 选项属性 -export interface TabBarItemProperty { - // 标签文字 - text: string - // 链接 - url: string - // 默认图标链接 - iconUrl: string - // 选中的图标链接 - activeIconUrl: string -} - -// 样式 -export interface TabBarStyle { - // 背景类型 - bgType: 'color' | 'img' - // 背景颜色 - bgColor: string - // 图片链接 - bgImg: string - // 默认颜色 - color: string - // 选中的颜色 - activeColor: string -} - -// 定义组件 -export const component = { - id: 'TabBar', - name: '底部导航', - icon: 'fluent:table-bottom-row-16-filled', - property: { - theme: 'red', - style: { - bgType: 'color', - bgColor: '#fff', - color: '#282828', - activeColor: '#fc4141' - }, - items: [ - { - text: '首页', - url: '/pages/index/index', - iconUrl: 'http://mall.yudao.iocoder.cn/static/images/1-001.png', - activeIconUrl: 'http://mall.yudao.iocoder.cn/static/images/1-002.png' - }, - { - text: '分类', - url: '/pages/index/category?id=3', - iconUrl: 'http://mall.yudao.iocoder.cn/static/images/2-001.png', - activeIconUrl: 'http://mall.yudao.iocoder.cn/static/images/2-002.png' - }, - { - text: '购物车', - url: '/pages/index/cart', - iconUrl: 'http://mall.yudao.iocoder.cn/static/images/3-001.png', - activeIconUrl: 'http://mall.yudao.iocoder.cn/static/images/3-002.png' - }, - { - text: '我的', - url: '/pages/index/user', - iconUrl: 'http://mall.yudao.iocoder.cn/static/images/4-001.png', - activeIconUrl: 'http://mall.yudao.iocoder.cn/static/images/4-002.png' - } - ] - } -} as DiyComponent - -export const THEME_LIST = [ - { id: 'red', name: '中国红', icon: 'icon-park-twotone:theme', color: '#d10019' }, - { id: 'orange', name: '桔橙', icon: 'icon-park-twotone:theme', color: '#f37b1d' }, - { id: 'gold', name: '明黄', icon: 'icon-park-twotone:theme', color: '#fbbd08' }, - { id: 'green', name: '橄榄绿', icon: 'icon-park-twotone:theme', color: '#8dc63f' }, - { id: 'cyan', name: '天青', icon: 'icon-park-twotone:theme', color: '#1cbbb4' }, - { id: 'blue', name: '海蓝', icon: 'icon-park-twotone:theme', color: '#0081ff' }, - { id: 'purple', name: '姹紫', icon: 'icon-park-twotone:theme', color: '#6739b6' }, - { id: 'brightRed', name: '嫣红', icon: 'icon-park-twotone:theme', color: '#e54d42' }, - { id: 'forestGreen', name: '森绿', icon: 'icon-park-twotone:theme', color: '#39b54a' }, - { id: 'mauve', name: '木槿', icon: 'icon-park-twotone:theme', color: '#9c26b0' }, - { id: 'pink', name: '桃粉', icon: 'icon-park-twotone:theme', color: '#e03997' }, - { id: 'brown', name: '棕褐', icon: 'icon-park-twotone:theme', color: '#a5673f' }, - { id: 'grey', name: '玄灰', icon: 'icon-park-twotone:theme', color: '#8799a3' }, - { id: 'gray', name: '草灰', icon: 'icon-park-twotone:theme', color: '#aaaaaa' }, - { id: 'black', name: '墨黑', icon: 'icon-park-twotone:theme', color: '#333333' } -] diff --git a/src/components/DiyEditor/components/mobile/TabBar/index.vue b/src/components/DiyEditor/components/mobile/TabBar/index.vue deleted file mode 100644 index 44ba43c0..00000000 --- a/src/components/DiyEditor/components/mobile/TabBar/index.vue +++ /dev/null @@ -1,66 +0,0 @@ - - - diff --git a/src/components/DiyEditor/components/mobile/TabBar/property.vue b/src/components/DiyEditor/components/mobile/TabBar/property.vue deleted file mode 100644 index d1da142b..00000000 --- a/src/components/DiyEditor/components/mobile/TabBar/property.vue +++ /dev/null @@ -1,103 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/TitleBar/config.ts b/src/components/DiyEditor/components/mobile/TitleBar/config.ts deleted file mode 100644 index d9f0672c..00000000 --- a/src/components/DiyEditor/components/mobile/TitleBar/config.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' - -/** 标题栏属性 */ -export interface TitleBarProperty { - // 背景图 - bgImgUrl: string - // 偏移 - marginLeft: number - // 显示位置 - textAlign: 'left' | 'center' - // 主标题 - title: string - // 副标题 - description: string - // 标题大小 - titleSize: number - // 描述大小 - descriptionSize: number - // 标题粗细 - titleWeight: number - // 描述粗细 - descriptionWeight: number - // 标题颜色 - titleColor: string - // 描述颜色 - descriptionColor: string - // 查看更多 - more: { - // 是否显示查看更多 - show: false - // 样式选择 - type: 'text' | 'icon' | 'all' - // 自定义文字 - text: string - // 链接 - url: string - } - // 组件样式 - style: ComponentStyle -} - -// 定义组件 -export const component = { - id: 'TitleBar', - name: '标题栏', - icon: 'material-symbols:line-start', - property: { - title: '主标题', - description: '副标题', - titleSize: 16, - descriptionSize: 12, - titleWeight: 400, - textAlign: 'left', - descriptionWeight: 200, - titleColor: 'rgba(50, 50, 51, 10)', - descriptionColor: 'rgba(150, 151, 153, 10)', - more: { - //查看更多 - show: false, - type: 'icon', - text: '查看更多', - url: '' - }, - style: { - bgType: 'color', - bgColor: '#fff' - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/TitleBar/index.vue b/src/components/DiyEditor/components/mobile/TitleBar/index.vue deleted file mode 100644 index b75d224e..00000000 --- a/src/components/DiyEditor/components/mobile/TitleBar/index.vue +++ /dev/null @@ -1,73 +0,0 @@ - - - diff --git a/src/components/DiyEditor/components/mobile/TitleBar/property.vue b/src/components/DiyEditor/components/mobile/TitleBar/property.vue deleted file mode 100644 index 44d6bb61..00000000 --- a/src/components/DiyEditor/components/mobile/TitleBar/property.vue +++ /dev/null @@ -1,121 +0,0 @@ - - - - diff --git a/src/components/DiyEditor/components/mobile/UserCard/config.ts b/src/components/DiyEditor/components/mobile/UserCard/config.ts deleted file mode 100644 index 7b337761..00000000 --- a/src/components/DiyEditor/components/mobile/UserCard/config.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' - -/** 用户卡片属性 */ -export interface UserCardProperty { - // 组件样式 - style: ComponentStyle -} - -// 定义组件 -export const component = { - id: 'UserCard', - name: '用户卡片', - icon: 'mdi:user-card-details', - property: { - style: { - bgType: 'color', - bgColor: '', - marginBottom: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/UserCard/index.vue b/src/components/DiyEditor/components/mobile/UserCard/index.vue deleted file mode 100644 index 14b447c6..00000000 --- a/src/components/DiyEditor/components/mobile/UserCard/index.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - - diff --git a/src/components/DiyEditor/components/mobile/UserCard/property.vue b/src/components/DiyEditor/components/mobile/UserCard/property.vue deleted file mode 100644 index 43dfad2c..00000000 --- a/src/components/DiyEditor/components/mobile/UserCard/property.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/UserCoupon/config.ts b/src/components/DiyEditor/components/mobile/UserCoupon/config.ts deleted file mode 100644 index 92eba9b6..00000000 --- a/src/components/DiyEditor/components/mobile/UserCoupon/config.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' - -/** 用户卡券属性 */ -export interface UserCouponProperty { - // 组件样式 - style: ComponentStyle -} - -// 定义组件 -export const component = { - id: 'UserCoupon', - name: '用户卡券', - icon: 'ep:ticket', - property: { - style: { - bgType: 'color', - bgColor: '', - marginLeft: 8, - marginRight: 8, - marginBottom: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/UserCoupon/index.vue b/src/components/DiyEditor/components/mobile/UserCoupon/index.vue deleted file mode 100644 index 27ad310a..00000000 --- a/src/components/DiyEditor/components/mobile/UserCoupon/index.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/components/DiyEditor/components/mobile/UserCoupon/property.vue b/src/components/DiyEditor/components/mobile/UserCoupon/property.vue deleted file mode 100644 index f902e04e..00000000 --- a/src/components/DiyEditor/components/mobile/UserCoupon/property.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/UserOrder/config.ts b/src/components/DiyEditor/components/mobile/UserOrder/config.ts deleted file mode 100644 index f9c5a6db..00000000 --- a/src/components/DiyEditor/components/mobile/UserOrder/config.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' - -/** 用户订单属性 */ -export interface UserOrderProperty { - // 组件样式 - style: ComponentStyle -} - -// 定义组件 -export const component = { - id: 'UserOrder', - name: '用户订单', - icon: 'ep:list', - property: { - style: { - bgType: 'color', - bgColor: '', - marginLeft: 8, - marginRight: 8, - marginBottom: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/UserOrder/index.vue b/src/components/DiyEditor/components/mobile/UserOrder/index.vue deleted file mode 100644 index 450ae548..00000000 --- a/src/components/DiyEditor/components/mobile/UserOrder/index.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/src/components/DiyEditor/components/mobile/UserOrder/property.vue b/src/components/DiyEditor/components/mobile/UserOrder/property.vue deleted file mode 100644 index 42df7410..00000000 --- a/src/components/DiyEditor/components/mobile/UserOrder/property.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/UserWallet/config.ts b/src/components/DiyEditor/components/mobile/UserWallet/config.ts deleted file mode 100644 index 4e0955f5..00000000 --- a/src/components/DiyEditor/components/mobile/UserWallet/config.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' - -/** 用户资产属性 */ -export interface UserWalletProperty { - // 组件样式 - style: ComponentStyle -} - -// 定义组件 -export const component = { - id: 'UserWallet', - name: '用户资产', - icon: 'ep:wallet-filled', - property: { - style: { - bgType: 'color', - bgColor: '', - marginLeft: 8, - marginRight: 8, - marginBottom: 8 - } as ComponentStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/UserWallet/index.vue b/src/components/DiyEditor/components/mobile/UserWallet/index.vue deleted file mode 100644 index 0efc9371..00000000 --- a/src/components/DiyEditor/components/mobile/UserWallet/index.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/components/DiyEditor/components/mobile/UserWallet/property.vue b/src/components/DiyEditor/components/mobile/UserWallet/property.vue deleted file mode 100644 index 549367e3..00000000 --- a/src/components/DiyEditor/components/mobile/UserWallet/property.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/VideoPlayer/config.ts b/src/components/DiyEditor/components/mobile/VideoPlayer/config.ts deleted file mode 100644 index 02f03747..00000000 --- a/src/components/DiyEditor/components/mobile/VideoPlayer/config.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' - -/** 视频播放属性 */ -export interface VideoPlayerProperty { - // 视频链接 - videoUrl: string - // 封面链接 - posterUrl: string - // 是否自动播放 - autoplay: boolean - // 组件样式 - style: VideoPlayerStyle -} - -// 视频播放样式 -export interface VideoPlayerStyle extends ComponentStyle { - // 视频高度 - height: number -} - -// 定义组件 -export const component = { - id: 'VideoPlayer', - name: '视频播放', - icon: 'ep:video-play', - property: { - videoUrl: '', - posterUrl: '', - autoplay: false, - style: { - bgType: 'color', - bgColor: '#fff', - marginBottom: 8, - height: 300 - } as VideoPlayerStyle - } -} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/VideoPlayer/index.vue b/src/components/DiyEditor/components/mobile/VideoPlayer/index.vue deleted file mode 100644 index fa9a914f..00000000 --- a/src/components/DiyEditor/components/mobile/VideoPlayer/index.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - - diff --git a/src/components/DiyEditor/components/mobile/VideoPlayer/property.vue b/src/components/DiyEditor/components/mobile/VideoPlayer/property.vue deleted file mode 100644 index 7598543b..00000000 --- a/src/components/DiyEditor/components/mobile/VideoPlayer/property.vue +++ /dev/null @@ -1,55 +0,0 @@ - - - - - diff --git a/src/components/DiyEditor/components/mobile/index.ts b/src/components/DiyEditor/components/mobile/index.ts deleted file mode 100644 index c0dc67da..00000000 --- a/src/components/DiyEditor/components/mobile/index.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 组件注册 - * - * 组件规范: - * 1. 每个子目录就是一个独立的组件,每个目录包括以下三个文件: - * 2. config.ts:组件配置,必选,用于定义组件、组件默认的属性、定义属性的类型 - * 3. index.vue:组件展示,用于展示组件的渲染效果。可以不提供,如 Page(页面设置),只需要属性配置表单即可 - * 4. property.vue:组件属性表单,用于配置组件,必选, - * - * 注: - * 组件ID以config.ts中配置的id为准,与组件目录的名称无关,但还是建议组件目录的名称与组件ID保持一致 - */ - -// 导入组件界面模块 -const viewModules: Record = import.meta.glob('./*/*.vue') -// 导入配置模块 -const configModules: Record = import.meta.glob('./*/config.ts', { eager: true }) - -// 界面模块 -const components = {} -// 组件配置模块 -const componentConfigs = {} - -// 组件界面的类型 -type ViewType = 'index' | 'property' - -/** - * 注册组件的界面模块 - * - * @param componentId 组件ID - * @param configPath 配置模块的文件路径 - * @param viewType 组件界面的类型 - */ -const registerComponentViewModule = ( - componentId: string, - configPath: string, - viewType: ViewType -) => { - const viewPath = configPath.replace('config.ts', `${viewType}.vue`) - const viewModule = viewModules[viewPath] - if (viewModule) { - // 定义异步组件 - components[componentId] = defineAsyncComponent(viewModule) - } -} - -// 注册 -Object.keys(configModules).forEach((modulePath: string) => { - const component = configModules[modulePath].component - const componentId = component?.id - if (componentId) { - // 注册组件 - componentConfigs[componentId] = component - // 注册预览界面 - registerComponentViewModule(componentId, modulePath, 'index') - // 注册属性配置表单 - registerComponentViewModule(`${componentId}Property`, modulePath, 'property') - } -}) - -export { components, componentConfigs } diff --git a/src/components/DiyEditor/index.vue b/src/components/DiyEditor/index.vue deleted file mode 100644 index 355ff156..00000000 --- a/src/components/DiyEditor/index.vue +++ /dev/null @@ -1,566 +0,0 @@ -