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)" >