From 3a09aaa7511bd0cec8032ef4a76e6e880c97a09a Mon Sep 17 00:00:00 2001 From: timerzz Date: Tue, 3 Dec 2024 11:03:35 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E5=B1=8F=E8=94=BD=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/articles.js | 16 ++- src/views/article/index.vue | 63 ++++++++-- src/views/ban/index.vue | 221 ++++++++++++++++++++++++++++++++++++ src/views/layout/Aside.vue | 10 +- 4 files changed, 297 insertions(+), 13 deletions(-) create mode 100644 src/views/ban/index.vue diff --git a/src/api/articles.js b/src/api/articles.js index f33a2ab..105111d 100644 --- a/src/api/articles.js +++ b/src/api/articles.js @@ -9,7 +9,7 @@ export const ListArticles = (q) => { } export const GetArticle = (id) =>{ - return articles.get(`/${id}`) + return articles.get(`/u/${id}`) } export const UpdateArticle = (article)=>{ @@ -33,4 +33,18 @@ export const UpdateProviderArticle=(article)=>{ export const UpdateSellerArticle=(article)=>{ return articles.patch('seller',article) +} + + +export const BanArticle=(ids) => { + return articles.post(`ban/${ids}`) +} + +export const LiftBanArticle=(ids)=>{ + return articles.delete(`ban/${ids}`) +} + +export const ListBanArticle=(q)=>{ + const query = queryRemoveZero(q) + return articles.get('ban', query) } \ No newline at end of file diff --git a/src/views/article/index.vue b/src/views/article/index.vue index 2edd0ba..6dfab8e 100644 --- a/src/views/article/index.vue +++ b/src/views/article/index.vue @@ -1,17 +1,22 @@