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() {