From c72e7a915fac2574a4958f904b1b0cdd0050c91d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A5=E6=B5=B7?= Date: Fri, 2 Feb 2024 14:21:11 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E8=AF=B7=E6=B1=82=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 4 +++- src/components/HotList.vue | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 80400e5..474b1ca 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -4,11 +4,13 @@ import axios from "@/api/request"; * 获取热榜分类数据 * @param {string} type 热榜分类名称 * @param {boolean} isNew 是否拉取最新数据 + * @param {object} params 请求参数 * @returns */ -export const getHotLists = (type, isNew) => { +export const getHotLists = (type, isNew, params) => { return axios({ method: "GET", url: `/${type}${isNew ? "/new" : "/"}`, + params, }); }; diff --git a/src/components/HotList.vue b/src/components/HotList.vue index fff212f..d70fe71 100644 --- a/src/components/HotList.vue +++ b/src/components/HotList.vue @@ -38,7 +38,7 @@ secondary strong round - @click.stop="getHotListsData(hotData.name)" + @click.stop="getHotListsData(hotData)" >