From c26591a06a550f87ab706861305e3ff33868f421 Mon Sep 17 00:00:00 2001 From: Timi Date: Tue, 22 Jul 2025 13:14:06 +0800 Subject: [PATCH] upper Article api to timi-web --- src/api/ArticleAPI.ts | 24 +------------------ .../article/template/ArticleAbout.vue | 3 +-- src/views/ArticleDetail.vue | 3 +-- 3 files changed, 3 insertions(+), 27 deletions(-) diff --git a/src/api/ArticleAPI.ts b/src/api/ArticleAPI.ts index dc57fbe..f297d5d 100644 --- a/src/api/ArticleAPI.ts +++ b/src/api/ArticleAPI.ts @@ -1,37 +1,15 @@ -import { Article, ArticleView, axios, Page, PageResult } from "timi-web"; +import { Article, axios, Page, PageResult } from "timi-web"; import { ArticleRanking } from "@/types/Article.ts"; async function page(page: Page): Promise>> { return axios.post("/article/list", page); } -/** - * 获取文章 - * - * @param id 文章 ID - * @returns 文章数据 - */ -async function view(id: number): Promise> { - return axios.get(`/article/${id}`); -} - -/** - * 喜欢文章,后端有限调用,1240ms 一次 - * - * @param id 文章 ID - * @returns 最新喜欢数量 - */ -async function like(id: number): Promise { - return axios.get(`/article/like/${id}`); -} - async function listRanking(): Promise { return axios.get("/article/list/ranking"); } export default { - view, - like, page, listRanking }; diff --git a/src/components/article/template/ArticleAbout.vue b/src/components/article/template/ArticleAbout.vue index 66d6095..326585c 100644 --- a/src/components/article/template/ArticleAbout.vue +++ b/src/components/article/template/ArticleAbout.vue @@ -25,8 +25,7 @@