From 5238df86e56833f88e5d5aa2a9467dda0bb25743 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Sat, 22 Feb 2025 11:09:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0ipad=E7=82=B9=E9=A4=90?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/account/padProd.ts | 102 ++++ src/components/GoodsSelect/index.vue | 235 ++++++++ .../online-shop/components/addPadPage.vue | 543 ++++++++++++++++++ src/views/online-shop/components/layout.js | 52 ++ src/views/online-shop/pad-setting.vue | 306 +++++++++- 5 files changed, 1237 insertions(+), 1 deletion(-) create mode 100644 src/api/account/padProd.ts create mode 100644 src/components/GoodsSelect/index.vue create mode 100644 src/views/online-shop/components/addPadPage.vue create mode 100644 src/views/online-shop/components/layout.js diff --git a/src/api/account/padProd.ts b/src/api/account/padProd.ts new file mode 100644 index 0000000..0cfcb8c --- /dev/null +++ b/src/api/account/padProd.ts @@ -0,0 +1,102 @@ +import request from "@/utils/request"; +import { Account_BaseUrl } from "@/api/config"; +const baseURL = Account_BaseUrl + "/admin/padProd"; +const API = { + getList(data: getListRequest) { + return request({ + url: `${baseURL}`, + method: "get", + params: data + }); + }, + + get(params: getRequest) { + return request({ + url: `${baseURL}/detail`, + method: "get", + params + }); + }, + edit(data: editRequest) { + return request({ + url: `${baseURL}`, + method: "put", + data: data, + }); + }, + add(data: addRequest) { + return request({ + url: `${baseURL}`, + method: "post", + data: data, + }); + }, + delete(data: delteRequest) { + return request({ + url: `${baseURL}`, + method: "delete", + data: data, + }); + } +} +export default API; + +export type delteRequest = number | string | [number | string]; + +/** + * PadDetailAddDTO + */ +export interface addRequest { + /** + * 布局id + */ + padLayoutId: number | null; + /** + * 商品分类id + */ + productCategoryId: number | null; + /** + * 商品id集合 + */ + productIdList: number[] | null; + [property: string]: any; +} +export interface getRequest { + /** + * tb_pad_product_category Id + */ + id?: number; + [property: string]: any; +} +export interface getListRequest { + page?: string; + /** + * 分类id + */ + productCategoryId?: number; + size?: string; + [property: string]: any; +} + +/** + * PadDetailEditDTO + */ +export interface editRequest { + /** + * 列表id + */ + id: number | null; + /** + * 布局id + */ + padLayoutId?: number | null; + /** + * 商品列表id + */ + productIdList?: number[] | null; + /** + * 排序值 + */ + sort: string; + [property: string]: any; +} \ No newline at end of file diff --git a/src/components/GoodsSelect/index.vue b/src/components/GoodsSelect/index.vue new file mode 100644 index 0000000..400ac19 --- /dev/null +++ b/src/components/GoodsSelect/index.vue @@ -0,0 +1,235 @@ + + + + + \ No newline at end of file diff --git a/src/views/online-shop/components/addPadPage.vue b/src/views/online-shop/components/addPadPage.vue new file mode 100644 index 0000000..416769b --- /dev/null +++ b/src/views/online-shop/components/addPadPage.vue @@ -0,0 +1,543 @@ + + + + + + \ No newline at end of file diff --git a/src/views/online-shop/components/layout.js b/src/views/online-shop/components/layout.js new file mode 100644 index 0000000..8f046c0 --- /dev/null +++ b/src/views/online-shop/components/layout.js @@ -0,0 +1,52 @@ +export const layoutList = [ + { + code: "single", + createTime: "2024-10-22 15:50:05", + delFlag: 0, + id: 1, + maximum: 1, + name: "单图", + remark: null, + sort: 0, + }, + { + code: "double", + createTime: "2024-10-22 15:50:34", + delFlag: 0, + id: 2, + maximum: 2, + name: "双图", + remark: null, + sort: 1, + }, + { + code: "L1-R2", + createTime: "2024-10-22 15:51:20", + delFlag: 0, + id: 3, + maximum: 3, + name: "左一右二", + remark: null, + sort: 2, + }, + { + code: "4-gird", + createTime: "2024-10-22 15:52:22", + delFlag: 0, + id: 4, + maximum: 4, + name: "四图", + remark: "四宫格", + sort: 3, + }, + { + code: "6-grid", + createTime: "2024-10-22 15:53:21", + delFlag: 0, + id: 5, + maximum: 6, + name: "六图", + remark: "六宫格", + sort: 4, + }, +]; diff --git a/src/views/online-shop/pad-setting.vue b/src/views/online-shop/pad-setting.vue index 41a40c8..7cc3659 100644 --- a/src/views/online-shop/pad-setting.vue +++ b/src/views/online-shop/pad-setting.vue @@ -1 +1,305 @@ - \ No newline at end of file + + + + + \ No newline at end of file