From 4f5682c80ad42598e678023466c9fb96eec88382 Mon Sep 17 00:00:00 2001
From: zzp <34701892@qq.com>
Date: Thu, 11 Sep 2025 20:21:53 +0800
Subject: [PATCH] =?UTF-8?q?feat(=E5=AE=9E=E6=97=B6=E8=B5=84=E8=AE=AF):=20?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=91=A8=E7=83=AD=E5=BA=A6=E7=BB=9F=E8=AE=A1?=
=?UTF-8?q?=E5=9B=BE=E8=A1=A8=E7=BB=84=E4=BB=B6=E5=8F=8A=E4=BA=A4=E4=BA=92?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
添加LineHol和LineHolYellow图表组件用于展示周热度统计数据
实现行业、概念标签和媒体来源的tab切换功能
优化页面布局和样式,调整部分标题文字
---
src/components/charts/LineHol.vue | 149 ++++++++++++++++++++++++
src/components/charts/LineHolYellow.vue | 88 ++++++++++++++
src/pages/realtimeInfo/index.vue | 112 +++++++++++-------
3 files changed, 309 insertions(+), 40 deletions(-)
create mode 100644 src/components/charts/LineHol.vue
create mode 100644 src/components/charts/LineHolYellow.vue
diff --git a/src/components/charts/LineHol.vue b/src/components/charts/LineHol.vue
new file mode 100644
index 0000000..9db5b47
--- /dev/null
+++ b/src/components/charts/LineHol.vue
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/charts/LineHolYellow.vue b/src/components/charts/LineHolYellow.vue
new file mode 100644
index 0000000..f97273d
--- /dev/null
+++ b/src/components/charts/LineHolYellow.vue
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/realtimeInfo/index.vue b/src/pages/realtimeInfo/index.vue
index 3caab47..4218376 100644
--- a/src/pages/realtimeInfo/index.vue
+++ b/src/pages/realtimeInfo/index.vue
@@ -6,9 +6,7 @@
- 数据更新时间:{{
- dayjs(new Date().getTime()).format("YYYY-MM-DD")
- }}
+ 数据更新时间:{{ dayjs(new Date().getTime()).format("YYYY-MM-DD") }}
@@ -60,31 +58,32 @@
-
+
-
+
+
+
+
+
+
+
+
+
-
+
查看全部
@@ -96,13 +95,7 @@
-
+
查看全部
@@ -115,8 +108,11 @@
退出登录
-
+
@@ -132,21 +128,15 @@ import tagicon_2 from "@/assets/zixun/tagicon_2.png";
import LoginPopup from "@/components/loginPopup/index.vue";
import { Session } from "@/utils/storage";
-import {
- getindustryCount,
- getConceptCount,
- getTopNews,
- getTopIndustry_d,
- getTopConcept_d,
- getNews_cnt_d,
- newsInfoScore,
-} from "@/api/newsInfo";
+import { getindustryCount, getConceptCount, getTopNews, getTopIndustry_d, getTopConcept_d, getNews_cnt_d, newsInfoScore } from "@/api/newsInfo";
import countTo from "@/components/count-to/vue-countTo.vue";
import RankList from "@/components/RankList.vue"; // 路径根据实际调整
import InfoSummary from "@/components/InfoSummary.vue"; // 路径根据实际调整
import indexMenuTitle from "@/components/indexMenuTitle.vue"; // 路径根据实际调整
import dayjs from "dayjs/esm/index";
import HotIndustryList from "@/components/HotIndustryList.vue"; // 路径根据实际调整
+import LineHol from "@/components/charts/LineHol.vue";
+import LineHolYellow from "@/components/charts/LineHolYellow.vue";
const newsList = ref([]);
@@ -218,9 +208,9 @@ function initData() {
getNews_cnt_dFn();
}
-const type = ref();
-function onViewAll(type) {
- type.value = type;
+const type = ref(null);
+function onViewAll(type1) {
+ type.value = type1;
if (Session.get("token")) {
uni.navigateTo({
url: "/pages/realtimeInfo/rankDetail?type=" + type,
@@ -260,6 +250,11 @@ function loginOut() {
window.location.reload();
}
+const lineTabIndex = ref(0);
+function handleTabClick(index) {
+ lineTabIndex.value = index;
+}
+
onUnmounted(() => {
clearInterval(timer);
});
@@ -400,4 +395,41 @@ onMounted(async () => {
margin-right: 20rpx;
margin-bottom: 20rpx;
}
+
+.tabs {
+ display: flex;
+ align-items: center;
+ height: 30px;
+ border-radius: 10px;
+
+ .tab {
+ width: 100px;
+ height: 100%;
+ display: flex;
+ text-align: center;
+ justify-content: center;
+ align-items: center;
+ border: 1px solid #e7e7e7;
+ color: #000;
+ font-size: 12px;
+ }
+
+ .tab_left {
+ border-start-start-radius: 10px;
+ border-end-start-radius: 10px;
+ border-right: 0;
+ }
+
+ .tab_right {
+ border-start-end-radius: 10px;
+ border-end-end-radius: 10px;
+ border-left: 0;
+ }
+
+ .active {
+ border: 1px solid #007bff;
+ background-color: #007bff;
+ color: #fff;
+ }
+}