From 61d0ea2fbe19eb2d2491c9f1814843452f20dd70 Mon Sep 17 00:00:00 2001 From: K <1175047471@qq.com> Date: Thu, 29 Feb 2024 18:08:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BA=A7=E5=93=81=E8=AF=A6=E6=83=85=20?= =?UTF-8?q?-=20Topic=20=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/product/topic.ts | 29 ++++ .../components/CustomTopicFormModal.vue | 93 ++++++++++++ src/views/product/components/TopicManage.vue | 137 ++++++++++++++++++ src/views/product/components/index.ts | 1 + src/views/product/detail.vue | 92 ++++++++++++ 5 files changed, 352 insertions(+) create mode 100644 src/api/product/topic.ts create mode 100644 src/views/product/components/CustomTopicFormModal.vue create mode 100644 src/views/product/components/TopicManage.vue create mode 100644 src/views/product/components/index.ts create mode 100644 src/views/product/detail.vue diff --git a/src/api/product/topic.ts b/src/api/product/topic.ts new file mode 100644 index 00000000..893fc562 --- /dev/null +++ b/src/api/product/topic.ts @@ -0,0 +1,29 @@ +import type { GetTopicListPrams, Topic } from './types' +import { defHttp } from '@/utils/http/axios' + +export function getTopicList(params: GetTopicListPrams) { + return defHttp.get>({ + url: '/product/topic/page', + params, + }) +} + +export function createTopic(data: Partial) { + return defHttp.post({ + url: '/product/topic/save', + data, + }) +} + +export function updateTopic(data: Partial) { + return defHttp.post({ + url: '/product/topic/update', + data, + }) +} + +export function deleteTopic(id: string) { + return defHttp.post({ + url: `/product/topic/remove?id=${id}`, + }) +} diff --git a/src/views/product/components/CustomTopicFormModal.vue b/src/views/product/components/CustomTopicFormModal.vue new file mode 100644 index 00000000..b8fe4231 --- /dev/null +++ b/src/views/product/components/CustomTopicFormModal.vue @@ -0,0 +1,93 @@ + + + diff --git a/src/views/product/components/TopicManage.vue b/src/views/product/components/TopicManage.vue new file mode 100644 index 00000000..4ac2c99d --- /dev/null +++ b/src/views/product/components/TopicManage.vue @@ -0,0 +1,137 @@ + + + diff --git a/src/views/product/components/index.ts b/src/views/product/components/index.ts new file mode 100644 index 00000000..2defe262 --- /dev/null +++ b/src/views/product/components/index.ts @@ -0,0 +1 @@ +export { default as TopicManage } from './TopicManage.vue' diff --git a/src/views/product/detail.vue b/src/views/product/detail.vue new file mode 100644 index 00000000..d04ce55e --- /dev/null +++ b/src/views/product/detail.vue @@ -0,0 +1,92 @@ + + +