From 4b706bb8115fb8fcba2c67813209f8a4bfd484ea Mon Sep 17 00:00:00 2001 From: chenghuan Date: Mon, 1 Dec 2025 16:35:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=96=B0=E9=97=BB=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/modules/news.ts | 27 +++++++++ pages.json | 6 ++ pages/news/details.vue | 122 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 155 insertions(+) create mode 100644 api/modules/news.ts create mode 100644 pages/news/details.vue diff --git a/api/modules/news.ts b/api/modules/news.ts new file mode 100644 index 0000000..12368fc --- /dev/null +++ b/api/modules/news.ts @@ -0,0 +1,27 @@ +import { mainClient } from '@/api/clients/main' +import type { IApiResponse } from '@/api/types' + +export const newsApi = { + /** + * 获取新闻详情 + */ + getNewsDetail: async (newsId: string | number) => { + const res = await mainClient.request>({ + url: `common/message/getMessageById?id=${newsId}`, + method: 'POST' + }) + return res + }, + + /** + * 获取太湖之光文章详情 + */ + getTaihuWelfareArticleDetail: async (newsId: string | number) => { + const res = await mainClient.request>({ + url: 'common/taihuWelfare/getTaihuWelfareArticleDetail', + method: 'POST', + data: { id: newsId } + }) + return res + } +} \ No newline at end of file diff --git a/pages.json b/pages.json index 0a8d423..fa4f305 100644 --- a/pages.json +++ b/pages.json @@ -193,6 +193,12 @@ "navigationStyle": "custom", "navigationBarTitleText": "%order.orderDetails%" } + }, { + "path": "pages/news/details", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "新闻详情" + } }, { "path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup", "style": { diff --git a/pages/news/details.vue b/pages/news/details.vue new file mode 100644 index 0000000..0c57939 --- /dev/null +++ b/pages/news/details.vue @@ -0,0 +1,122 @@ + + + + + \ No newline at end of file