diff --git a/src/api/newsInfo.ts b/src/api/newsInfo.ts index fd15861..2ec3c11 100644 --- a/src/api/newsInfo.ts +++ b/src/api/newsInfo.ts @@ -16,9 +16,9 @@ export const getConceptCount = (data: any) => { }; // 概念标签贴标 -export const getTopNewsDay = (data: any) => { +export const getTopNewsDay = (params: any) => { // return request.get("/top_news_h5_period?start_date=" + data.start_date + "&end_date=" + data.end_date + "&limit_num=" + data.limit_num, data); - return request.get("/top_news_h5_d", data); + return request.get("/top_news_h5_d", params); }; // 概念标签贴标 diff --git a/src/pages/realtimeInfo/pc/rank.vue b/src/pages/realtimeInfo/pc/rank.vue index d4f7274..1455155 100644 --- a/src/pages/realtimeInfo/pc/rank.vue +++ b/src/pages/realtimeInfo/pc/rank.vue @@ -142,7 +142,9 @@ async function getNewsList() { } } else { // 概念标签贴标 - newsList.value = await getTopNewsDay({}); + const res = await getTopNewsDay({}); + + newsList.value = res || [] } } diff --git a/src/utils/indexDatav.ts b/src/utils/indexDatav.ts index ec0f2fd..4cbcd9e 100644 --- a/src/utils/indexDatav.ts +++ b/src/utils/indexDatav.ts @@ -23,7 +23,7 @@ service.interceptors.request.use( // 在发送请求之前做些什么 token if (Session.get("token")) { config.headers!["auth-token"] = `${Session.get("token")}`; - config.headers!["phone"] = `${Session.get("userInfos").phone}`; + config.headers!["phone"] = `${Session.get("userPhone")}`; } return config; },