From 70f24e071cd3ff2ff35152e6e5da47bb7e8caa0b Mon Sep 17 00:00:00 2001 From: lq Date: Tue, 20 May 2025 16:58:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=95=86=E5=93=81=E3=80=81=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E9=83=A8=E5=88=86=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90=EF=BC=8C=E4=B8=8B=E4=B8=80=E6=AD=A5=E5=85=88?= =?UTF-8?q?=E6=8A=8A=E5=95=86=E5=93=81=E6=90=9E=E5=AE=8C=E5=86=8D=E6=90=9E?= =?UTF-8?q?=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/mall/api/index.ts | 42 ---- .../src/views/mall/components/modal.vue | 66 ------- apps/web-antd/src/views/mall/config/form.ts | 179 ------------------ apps/web-antd/src/views/mall/config/search.ts | 55 ------ apps/web-antd/src/views/mall/config/table.ts | 94 --------- apps/web-antd/src/views/mall/index.vue | 137 -------------- 6 files changed, 573 deletions(-) delete mode 100644 apps/web-antd/src/views/mall/api/index.ts delete mode 100644 apps/web-antd/src/views/mall/components/modal.vue delete mode 100644 apps/web-antd/src/views/mall/config/form.ts delete mode 100644 apps/web-antd/src/views/mall/config/search.ts delete mode 100644 apps/web-antd/src/views/mall/config/table.ts delete mode 100644 apps/web-antd/src/views/mall/index.vue diff --git a/apps/web-antd/src/views/mall/api/index.ts b/apps/web-antd/src/views/mall/api/index.ts deleted file mode 100644 index 97b78f01..00000000 --- a/apps/web-antd/src/views/mall/api/index.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { requestClient } from '#/api/request'; - -const prefix = 'mall/'; -/** - * 分页查询店铺管理列表 - * @param data - */ -export async function getStoreListApi(data: any) { - return requestClient.get(`${prefix}list`, { params: data }); -} - -/** - * 获取店铺管理详情 - * @param id - */ -export async function getStoreInfoApi(id: number) { - return requestClient.get(`${prefix}detail`, { params: { id } }); -} - -/** - * 新增店铺管理 - * @param data - */ -export async function createStoreApi(data: Record) { - return requestClient.post(`${prefix}create`, data); -} - -/** - * 编辑店铺管理 - * @param data - */ -export async function updateStoreApi(data: Record) { - return requestClient.post(`${prefix}update`, data); -} - -/** - * 删除店铺管理 - * @param data - */ -export async function deleteStoreApi(data: Record) { - return requestClient.post(`${prefix}delete`, data); -} diff --git a/apps/web-antd/src/views/mall/components/modal.vue b/apps/web-antd/src/views/mall/components/modal.vue deleted file mode 100644 index a5af86f8..00000000 --- a/apps/web-antd/src/views/mall/components/modal.vue +++ /dev/null @@ -1,66 +0,0 @@ - - diff --git a/apps/web-antd/src/views/mall/config/form.ts b/apps/web-antd/src/views/mall/config/form.ts deleted file mode 100644 index 607721fe..00000000 --- a/apps/web-antd/src/views/mall/config/form.ts +++ /dev/null @@ -1,179 +0,0 @@ -import type { VbenFormProps } from '#/adapter/form'; - -import { getStoreClassificationOptionApi } from '#/views/my-gen/mall-classification/api'; - -export const modalFormProps: VbenFormProps = { - wrapperClass: 'grid-cols-12', // 24栅格, - commonConfig: { - formItemClass: 'col-span-12', - // 所有表单项 - componentProps: { - class: 'w-full', - }, - }, - // handleSubmit: onSubmit, - layout: 'horizontal', - schema: [ - { - component: 'VbenInput', - fieldName: 'id', - label: 'ID', - formItemClass: 'col-span-6', - dependencies: { - show: false, - triggerFields: ['id'], - }, - }, - // 生成的表单字段 - { - fieldName: 'name', - label: '店铺名称', - component: 'VbenInput', - formItemClass: 'col-span-6', - rules: 'required', - }, - { - fieldName: 'level', - label: '店铺等级', - component: 'InputNumber', - formItemClass: 'col-span-6', - rules: 'required', - }, - { - fieldName: 'introduction', - label: '店铺简介', - component: 'Textarea', - rules: 'required', - }, - { - fieldName: 'description', - label: '详细介绍', - component: 'Textarea', - rules: 'required', - }, - { - fieldName: 'phone', - label: '商家电话号码', - component: 'VbenInput', - formItemClass: 'col-span-6', - rules: 'required', - }, - { - fieldName: 'person', - label: '联系人名称', - component: 'VbenInput', - formItemClass: 'col-span-6', - rules: 'required', - }, - { - fieldName: 'id_card', - label: '身份证号码', - component: 'VbenInput', - formItemClass: 'col-span-6', - rules: 'required', - }, - { - fieldName: 'classification_id', - label: '行业', - component: 'ApiTreeSelect', - componentProps: { - childrenField: 'children', - labelField: 'name', - valueField: 'id', - api: getStoreClassificationOptionApi, - }, - formItemClass: 'col-span-6', - defaultValue: 0, - rules: 'required', - }, - { - fieldName: 'is_featured', - label: '推荐店铺', - component: 'RadioGroup', - componentProps: { - options: [ - { - label: '是', - value: 1, - }, - { - label: '否', - value: 0, - }, - ], - }, - formItemClass: 'col-span-6', - defaultValue: 0, - rules: 'required', - }, - { - fieldName: 'chain', - label: '连锁', - component: 'RadioGroup', - componentProps: { - options: [ - { - label: '是', - value: 1, - }, - { - label: '否', - value: 0, - }, - ], - }, - formItemClass: 'col-span-6', - defaultValue: 0, - rules: 'required', - }, - { - fieldName: 'business_suspended', - label: '暂停营业', - component: 'RadioGroup', - componentProps: { - options: [ - { - label: '是', - value: 1, - }, - { - label: '否', - value: 0, - }, - ], - }, - formItemClass: 'col-span-6', - defaultValue: 0, - rules: 'required', - }, - { - fieldName: 'avatar', - label: '店铺头像', - component: 'Avatar', - formItemClass: 'col-span-6', - rules: 'required', - }, - { - fieldName: 'business_license', - label: '营业执照', - component: 'Avatar', - formItemClass: 'col-span-6', - rules: 'required', - }, - { - fieldName: 'id_card_portrait_side', - label: '身份证人面', - component: 'Avatar', - formItemClass: 'col-span-6', - rules: 'required', - }, - { - fieldName: 'id_card_national_emblem_side', - label: '身份证国徽面', - component: 'Avatar', - formItemClass: 'col-span-6', - rules: 'required', - }, - ], - showDefaultActions: false, -}; diff --git a/apps/web-antd/src/views/mall/config/search.ts b/apps/web-antd/src/views/mall/config/search.ts deleted file mode 100644 index 2eff5f36..00000000 --- a/apps/web-antd/src/views/mall/config/search.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { VbenFormProps } from '#/adapter/form'; - -// import dayjs from 'dayjs'; - -export const formOptions: VbenFormProps = { - // 默认展开 - collapsed: false, - schema: [ - // 生成的搜索字段 - { - fieldName: 'name', - label: '店铺名称', - component: 'VbenInput', - }, - { - fieldName: 'level', - label: '店铺等级', - component: 'InputNumber', - }, - { - fieldName: 'phone', - label: '商家电话号码', - component: 'VbenInput', - }, - { - fieldName: 'person', - label: '联系人名称', - component: 'VbenInput', - }, - { - fieldName: 'is_featured', - label: '是否为推荐店铺', - component: 'VbenSelect', - }, - { - fieldName: 'chain', - label: '是否连锁', - component: 'VbenSelect', - }, - { - fieldName: 'business_suspended', - label: '是否暂停营业', - component: 'VbenSelect', - }, - ], - // 控制表单是否显示折叠按钮 - showCollapseButton: true, - submitButtonOptions: { - content: '查询', - }, - // 是否在字段值改变时提交表单 - submitOnChange: true, - // 按下回车时是否提交表单 - submitOnEnter: false, -}; diff --git a/apps/web-antd/src/views/mall/config/table.ts b/apps/web-antd/src/views/mall/config/table.ts deleted file mode 100644 index 2f517c96..00000000 --- a/apps/web-antd/src/views/mall/config/table.ts +++ /dev/null @@ -1,94 +0,0 @@ -import type { VxeGridProps } from '#/adapter/vxe-table'; - -import { getStoreListApi } from '../api'; - -interface RowType { - id: string; - name: string; - logo: string; - introduce: string; - created_at: string; -} - -export const gridOptions: VxeGridProps = { - checkboxConfig: { - highlight: true, - labelField: '', - }, - columnConfig: { - useKey: true, - }, - rowConfig: { - useKey: true, - }, - columns: [ - { type: 'checkbox', width: 60 }, - { field: 'id', align: 'left', title: 'ID', width: 100 }, - // 生成的列表字段 - { field: 'name', title: '店铺名称' }, - { field: 'level', title: '店铺等级' }, - { field: 'avatar', title: '店铺头像', slots: { default: 'avatar' } }, - { field: 'introduction', title: '店铺简介' }, - // { field: 'description', title: '详细介绍' }, - { field: 'phone', title: '商家电话号码' }, - { field: 'person', title: '联系人名称' }, - { field: 'id_card', title: '身份证号码' }, - { field: 'qr_code', title: '店铺二维码' }, - { field: 'is_featured', title: '是否为推荐店铺' }, - { - field: 'business_license', - title: '营业执照', - slots: { default: 'business_license' }, - }, - { - field: 'id_card_portrait_side', - title: '身份证人面', - slots: { default: 'id_card_portrait_side' }, - }, - { - field: 'id_card_national_emblem_side', - title: '身份证国徽面', - slots: { default: 'id_card_national_emblem_side' }, - }, - { field: 'chain', title: '是否连锁' }, - { field: 'business_suspended', title: '是否暂停营业' }, - - { field: 'created_at', title: '创建时间' }, - { field: 'updated_at', title: '编辑时间' }, - { type: 'html', title: '操作', slots: { default: 'action' } }, - ], - keepSource: true, - pagerConfig: {}, - proxyConfig: { - ajax: { - // 请求后端接口方法 - query: async ({ page }, formValues) => { - return await getStoreListApi({ - page: page.currentPage, - pageSize: page.pageSize, - ...formValues, - }); - }, - }, - }, - height: 'auto', - border: false, - toolbarConfig: { - // 是否显示搜索表单控制按钮 - // @ts-ignore 正式环境时有完整的类型声明 - search: true, - refresh: true, // 刷新 - print: false, // 打印 - export: false, // 导出 - // custom: true, // 自定义列 - zoom: true, // 最大化最小化 - slots: { - buttons: 'toolbar-buttons', - }, - custom: { - // 自定义列-图标 - icon: 'vxe-icon-menu', - }, - }, - showOverflow: false, -}; diff --git a/apps/web-antd/src/views/mall/index.vue b/apps/web-antd/src/views/mall/index.vue deleted file mode 100644 index 907810aa..00000000 --- a/apps/web-antd/src/views/mall/index.vue +++ /dev/null @@ -1,137 +0,0 @@ - - -