From fe2c53f01b12afc811b31e0518ba997801fb9e7e Mon Sep 17 00:00:00 2001 From: minimaxagent1 Date: Tue, 5 Aug 2025 17:40:15 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=9A=84=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E4=BC=98=E5=8C=9650%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/article/article.js | 15 +++++++++++++++ pages/nearbystores/index.vue | 7 ++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/api/article/article.js b/api/article/article.js index 80ef04a..6ae581e 100644 --- a/api/article/article.js +++ b/api/article/article.js @@ -20,6 +20,21 @@ export function getArticleByType(params = {}) { }) } +/** + * 根据ID获取文章详情 + * @param {string} id - 文章ID + * @returns {Promise} 返回文章详情数据 + */ +export function getArticleById(id) { + return request({ + url: '/app/article/byId', + method: 'GET', + params: { + id: id + } + }) +} + /** * 获取服务条款 * @returns {Promise} 返回服务条款数据 diff --git a/pages/nearbystores/index.vue b/pages/nearbystores/index.vue index cc0513b..1308df6 100644 --- a/pages/nearbystores/index.vue +++ b/pages/nearbystores/index.vue @@ -43,9 +43,9 @@ @@ -83,6 +83,7 @@ import navigationData from "../../enum/navigationData.json"; import { navigateToPage } from "../../utils/router.js"; import { getHomeConfig } from "../../api/index/index.js"; +import { getArticleById } from "../../api/article/article.js"; export default { data() {