From ecbb304fa6ad10685307e6ba595def4a83d24b98 Mon Sep 17 00:00:00 2001 From: huangge1199 Date: Tue, 27 Aug 2024 10:35:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8D=9A=E5=AE=A2=E6=A0=87?= =?UTF-8?q?=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/api/blog/tags.js | 44 ++++ src/views/blog/categories/index.vue | 20 +- src/views/blog/tags/index.vue | 304 ++++++++++++++++++++++++++++ 4 files changed, 362 insertions(+), 7 deletions(-) create mode 100644 src/api/blog/tags.js create mode 100644 src/views/blog/tags/index.vue diff --git a/package.json b/package.json index bd1ddbe..9a297a3 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "jsencrypt": "3.3.1", "nprogress": "0.2.0", "pinia": "^2.1.7", + "pinyin-pro": "^3.24.2", "vue": "^3.3.8", "vue-cropper": "1.0.3", "vue-i18n": "9.2.2", diff --git a/src/api/blog/tags.js b/src/api/blog/tags.js new file mode 100644 index 0000000..785a683 --- /dev/null +++ b/src/api/blog/tags.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询博客标签列表 +export function listTags(query) { + return request({ + url: '/blog/tags/list', + method: 'get', + params: query + }) +} + +// 查询博客标签详细 +export function getTags(id) { + return request({ + url: '/blog/tags/' + id, + method: 'get' + }) +} + +// 新增博客标签 +export function addTags(data) { + return request({ + url: '/blog/tags', + method: 'post', + data: data + }) +} + +// 修改博客标签 +export function updateTags(data) { + return request({ + url: '/blog/tags', + method: 'put', + data: data + }) +} + +// 删除博客标签 +export function delTags(id) { + return request({ + url: '/blog/tags/' + id, + method: 'delete' + }) +} diff --git a/src/views/blog/categories/index.vue b/src/views/blog/categories/index.vue index 3235124..a851ea8 100644 --- a/src/views/blog/categories/index.vue +++ b/src/views/blog/categories/index.vue @@ -69,13 +69,10 @@ - + - - - + + + + + + - - -