From a4c68718fcee4c2dc4fae4adb9ba90b88cce7207 Mon Sep 17 00:00:00 2001 From: bibi <541660090@qq.com> Date: Sat, 26 Feb 2022 15:57:45 +0800 Subject: [PATCH] 1 --- src/api/shop/goods/cate.js | 39 +++++ .../GoodsManage/_goodsCate/depend/config.js | 42 +++++ .../Shop/GoodsManage/_goodsCate/index.vue | 151 +++++++++++++++++- 3 files changed, 228 insertions(+), 4 deletions(-) create mode 100644 src/views/Shop/GoodsManage/_goodsCate/depend/config.js diff --git a/src/api/shop/goods/cate.js b/src/api/shop/goods/cate.js index e69de29..8f76579 100644 --- a/src/api/shop/goods/cate.js +++ b/src/api/shop/goods/cate.js @@ -0,0 +1,39 @@ +import httpService from "@/request" + +// 商品 +// 品牌 +export function cateList(params) { + return httpService({ + url: `/user/shopCategory/listAll`, + method: 'get', + params: params, + }) +} +export function cateShow(params) { + return httpService({ + url: `/user/shopCategory/isShow`, + method: 'get', + params: params, + }) +} +export function cateInfo(params) { + return httpService({ + url: `/user/shopCategory/listByParentId`, + method: 'get', + params: params, + }) +} +export function cateUpdate(params) { + return httpService({ + url: `/user/shopCategory/updateCategory`, + method: 'post', + data: params, + }) +} +export function cateInsert(params) { + return httpService({ + url: `/user/shopCategory/insertCategory`, + method: 'post', + data: params, + }) +} diff --git a/src/views/Shop/GoodsManage/_goodsCate/depend/config.js b/src/views/Shop/GoodsManage/_goodsCate/depend/config.js new file mode 100644 index 0000000..c8f7c74 --- /dev/null +++ b/src/views/Shop/GoodsManage/_goodsCate/depend/config.js @@ -0,0 +1,42 @@ +export const columns = [ + { + title: "分类名称", + dataIndex: "name", + width: "33%", + }, + { + title: "图片", + dataIndex: "imgpic", + width: "33%", + scopedSlots: { customRender: "imgpic"} + }, + { + title: "是否显示", + dataIndex: "isShow", + width: "33%", + customRender: function (isShow) { + switch (isShow) { + case 1: + return '显示' + case 0: + return '不显示' + } + } + }, + { + title: "操作", + dataIndex: "action", + key: "action", + width: "180", + fixed: "right", + scopedSlots: { customRender: "action" }, + }, +] +export const pagination = { + current: 1, + total: 0, + pageSize: 10, + showTotal: (total) => `共 ${total} 条`, + showSizeChanger: true, + showQuickJumper: true, +} diff --git a/src/views/Shop/GoodsManage/_goodsCate/index.vue b/src/views/Shop/GoodsManage/_goodsCate/index.vue index 3e72e23..6407301 100644 --- a/src/views/Shop/GoodsManage/_goodsCate/index.vue +++ b/src/views/Shop/GoodsManage/_goodsCate/index.vue @@ -1,14 +1,157 @@ - +