From 017e64125db0ae99bb2a5bd89478d235827ca737 Mon Sep 17 00:00:00 2001 From: monanxiao Date: Sat, 12 Oct 2024 10:58:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E6=BB=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/config.js | 18 +++ src/api/modules/goods.js | 25 ++++ src/views/config/index.vue | 259 ++++++++++++++++++++++++++++++++++++ src/views/config/options.js | 21 +++ src/views/goods/options.js | 34 +++++ 5 files changed, 357 insertions(+) create mode 100644 src/api/modules/config.js create mode 100644 src/api/modules/goods.js create mode 100644 src/views/config/index.vue create mode 100644 src/views/config/options.js create mode 100644 src/views/goods/options.js diff --git a/src/api/modules/config.js b/src/api/modules/config.js new file mode 100644 index 0000000..a3e9906 --- /dev/null +++ b/src/api/modules/config.js @@ -0,0 +1,18 @@ +import service from "../request.js"; +const API_BASE_URL = '/config'; + +// 客户列表 +export function getConfigList(query) { + return service({ + method: "get", + url: `${API_BASE_URL}/list`, + data: query, + }); +} +export function updateConfig(query) { + return service({ + method: "put", + url: `${API_BASE_URL}`, + data: query, + }); +} diff --git a/src/api/modules/goods.js b/src/api/modules/goods.js new file mode 100644 index 0000000..1fb7207 --- /dev/null +++ b/src/api/modules/goods.js @@ -0,0 +1,25 @@ +import service from "../request.js"; +const API_BASE_URL = '/goods'; + +// 客户列表 +export function getGoodsList(query) { + return service({ + method: "get", + url: `${API_BASE_URL}/list`, + data: query, + }); +} +export function addGoods(query) { + return service({ + method: "post", + url: `${API_BASE_URL}`, + data: query, + }); +} +export function updateGoods(query) { + return service({ + method: "put", + url: `${API_BASE_URL}`, + data: query, + }); +} diff --git a/src/views/config/index.vue b/src/views/config/index.vue new file mode 100644 index 0000000..720e898 --- /dev/null +++ b/src/views/config/index.vue @@ -0,0 +1,259 @@ + + + + + diff --git a/src/views/config/options.js b/src/views/config/options.js new file mode 100644 index 0000000..989d037 --- /dev/null +++ b/src/views/config/options.js @@ -0,0 +1,21 @@ +export const options = [ + { + label: '配置项目', + props: 'title', + width: 'auto', + align: 'left' + }, + { + label: '配置内容', + props: 'content', + width: 'auto', + align: 'left' + }, + { + label: '操作', + props: 'actions', + width: '150', + align: 'center', + fixed: 'right', + } +] diff --git a/src/views/goods/options.js b/src/views/goods/options.js new file mode 100644 index 0000000..e58c9a4 --- /dev/null +++ b/src/views/goods/options.js @@ -0,0 +1,34 @@ +export const options = [ + { + label: '标题图片', + props: 'carouselImage', + width: '200', + align: 'left' + }, + { + label: '服务名称', + props: 'goodsName', + width: 'auto', + align: 'left' + }, + { + label: '服务价格', + props: 'price', + width: '150', + align: 'left' + }, + { + label: '服务说明', + props: 'details', + width: 'auto', + align: 'left', + show: true + }, + { + label: '操作', + props: 'actions', + width: '150', + align: 'center', + fixed: 'right', + } +]