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 @@