From 9a26bd1064f4a4944e9b8081cd7c9e3707769c5d Mon Sep 17 00:00:00 2001 From: libao <15050590816@163.com> Date: Tue, 30 Apr 2024 09:09:27 +0800 Subject: [PATCH] =?UTF-8?q?2024.4.30=20=E6=B7=BB=E5=8A=A0=E5=AE=98?= =?UTF-8?q?=E7=BD=91=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/article.js | 44 +++++ src/api/system/category.js | 44 +++++ src/views/system/article/index.vue | 281 +++++++++++++++++++++++++++ src/views/system/category/index.vue | 286 ++++++++++++++++++++++++++++ 4 files changed, 655 insertions(+) create mode 100644 src/api/system/article.js create mode 100644 src/api/system/category.js create mode 100644 src/views/system/article/index.vue create mode 100644 src/views/system/category/index.vue diff --git a/src/api/system/article.js b/src/api/system/article.js new file mode 100644 index 0000000..69442c2 --- /dev/null +++ b/src/api/system/article.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询官网文章列表列表 +export function listArticle(query) { + return request({ + url: '/system/article/list', + method: 'get', + params: query + }) +} + +// 查询官网文章列表详细 +export function getArticle(id) { + return request({ + url: '/system/article/' + id, + method: 'get' + }) +} + +// 新增官网文章列表 +export function addArticle(data) { + return request({ + url: '/system/article', + method: 'post', + data: data + }) +} + +// 修改官网文章列表 +export function updateArticle(data) { + return request({ + url: '/system/article', + method: 'put', + data: data + }) +} + +// 删除官网文章列表 +export function delArticle(id) { + return request({ + url: '/system/article/' + id, + method: 'delete' + }) +} diff --git a/src/api/system/category.js b/src/api/system/category.js new file mode 100644 index 0000000..1b406bc --- /dev/null +++ b/src/api/system/category.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询文章分类列表 +export function listCategory(query) { + return request({ + url: '/system/category/list', + method: 'get', + params: query + }) +} + +// 查询文章分类详细 +export function getCategory(id) { + return request({ + url: '/system/category/' + id, + method: 'get' + }) +} + +// 新增文章分类 +export function addCategory(data) { + return request({ + url: '/system/category', + method: 'post', + data: data + }) +} + +// 修改文章分类 +export function updateCategory(data) { + return request({ + url: '/system/category', + method: 'put', + data: data + }) +} + +// 删除文章分类 +export function delCategory(id) { + return request({ + url: '/system/category/' + id, + method: 'delete' + }) +} diff --git a/src/views/system/article/index.vue b/src/views/system/article/index.vue new file mode 100644 index 0000000..bab7ef8 --- /dev/null +++ b/src/views/system/article/index.vue @@ -0,0 +1,281 @@ + + + diff --git a/src/views/system/category/index.vue b/src/views/system/category/index.vue new file mode 100644 index 0000000..b417a72 --- /dev/null +++ b/src/views/system/category/index.vue @@ -0,0 +1,286 @@ + + +