refactor(realtimeInfo): 移除自动刷新定时器并优化样式格式
- 注释掉自动刷新数据的定时器以减少不必要的请求 - 统一调整字体样式声明格式为多行以提高可读性 - 优化部分布局代码的格式
This commit is contained in:
parent
a00988529d
commit
e20ed0c7db
|
|
@ -58,7 +58,16 @@
|
||||||
<indexMenuTitle title="资讯评分分布区间"></indexMenuTitle>
|
<indexMenuTitle title="资讯评分分布区间"></indexMenuTitle>
|
||||||
<Line style="margin-top: 30rpx" :data="lineData"></Line>
|
<Line style="margin-top: 30rpx" :data="lineData"></Line>
|
||||||
|
|
||||||
<view style="display: flex; flex-direction: column; text-align: center; justify-content: center; align-items: center; padding-bottom: 30rpx">
|
<view
|
||||||
|
style="
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
text-align: center;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding-bottom: 30rpx;
|
||||||
|
"
|
||||||
|
>
|
||||||
<InfoSummary style="width: 85%" :count="newsNum"></InfoSummary>
|
<InfoSummary style="width: 85%" :count="newsNum"></InfoSummary>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -66,7 +75,17 @@
|
||||||
<view style="background-color: white; margin-top: 40rpx">
|
<view style="background-color: white; margin-top: 40rpx">
|
||||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||||
<indexMenuTitle title="资讯头条 Top20"></indexMenuTitle>
|
<indexMenuTitle title="资讯头条 Top20"></indexMenuTitle>
|
||||||
<view style="display: flex; align-items: center; margin-right: 15rpx; font-size: 30rpx; gap: 10rpx; margin-top: 10rpx" @click="showCalendar">
|
<view
|
||||||
|
style="
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-right: 15rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
gap: 10rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
"
|
||||||
|
@click="showCalendar"
|
||||||
|
>
|
||||||
{{ chooseDate.startDate.split(" ")[0] }}
|
{{ chooseDate.startDate.split(" ")[0] }}
|
||||||
<u-icon name="calendar" size="26" style="margin-right: 10rpx"></u-icon>
|
<u-icon name="calendar" size="26" style="margin-right: 10rpx"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -81,7 +100,9 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="background-color: white; margin-top: 40rpx">
|
<view style="background-color: white; margin-top: 40rpx">
|
||||||
<view style="display: flex; justify-content: space-between; align-items: center; padding-right: 30rpx; height: 100rpx">
|
<view
|
||||||
|
style="display: flex; justify-content: space-between; align-items: center; padding-right: 30rpx; height: 100rpx"
|
||||||
|
>
|
||||||
<indexMenuTitle title="热门行业池 Top10"></indexMenuTitle>
|
<indexMenuTitle title="热门行业池 Top10"></indexMenuTitle>
|
||||||
<view style="display: flex; gap: 3rpx">
|
<view style="display: flex; gap: 3rpx">
|
||||||
<text class="view-all" @click="onViewAll(0)">查看全部</text>
|
<text class="view-all" @click="onViewAll(0)">查看全部</text>
|
||||||
|
|
@ -93,7 +114,9 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="background-color: white; margin-top: 40rpx">
|
<view style="background-color: white; margin-top: 40rpx">
|
||||||
<view style="display: flex; justify-content: space-between; align-items: center; padding-right: 30rpx; height: 100rpx">
|
<view
|
||||||
|
style="display: flex; justify-content: space-between; align-items: center; padding-right: 30rpx; height: 100rpx"
|
||||||
|
>
|
||||||
<indexMenuTitle title="风口概念池 Top10"></indexMenuTitle>
|
<indexMenuTitle title="风口概念池 Top10"></indexMenuTitle>
|
||||||
<view style="display: flex; gap: 3rpx">
|
<view style="display: flex; gap: 3rpx">
|
||||||
<text class="view-all" @click="onViewAll(1)">查看全部</text>
|
<text class="view-all" @click="onViewAll(1)">查看全部</text>
|
||||||
|
|
@ -110,7 +133,8 @@
|
||||||
:show="LoginShow"
|
:show="LoginShow"
|
||||||
@handlePopupClose="handlePopupClose"
|
@handlePopupClose="handlePopupClose"
|
||||||
@handlePopupSuccessCallback="handlePopupSuccessCallback"
|
@handlePopupSuccessCallback="handlePopupSuccessCallback"
|
||||||
@handlePopupErrorCallback="handlePopupErrorCallback" />
|
@handlePopupErrorCallback="handlePopupErrorCallback"
|
||||||
|
/>
|
||||||
|
|
||||||
<u-calendar
|
<u-calendar
|
||||||
:show="calendarShow"
|
:show="calendarShow"
|
||||||
|
|
@ -121,7 +145,8 @@
|
||||||
monthNum="12"
|
monthNum="12"
|
||||||
:key="chooseDate.startDate"
|
:key="chooseDate.startDate"
|
||||||
@confirm="calendarConfirm"
|
@confirm="calendarConfirm"
|
||||||
@close="calendarShow = false">
|
@close="calendarShow = false"
|
||||||
|
>
|
||||||
</u-calendar>
|
</u-calendar>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -138,7 +163,15 @@ import tagicon_2 from "@/assets/zixun/tagicon_2.png";
|
||||||
import LoginPopup from "@/components/loginPopup/index.vue";
|
import LoginPopup from "@/components/loginPopup/index.vue";
|
||||||
import { Session } from "@/utils/storage";
|
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 countTo from "@/components/count-to/vue-countTo.vue";
|
||||||
import RankList from "@/components/RankList.vue"; // 路径根据实际调整
|
import RankList from "@/components/RankList.vue"; // 路径根据实际调整
|
||||||
import InfoSummary from "@/components/InfoSummary.vue"; // 路径根据实际调整
|
import InfoSummary from "@/components/InfoSummary.vue"; // 路径根据实际调整
|
||||||
|
|
@ -261,9 +294,9 @@ function onViewAll(type1) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const timer = setInterval(() => {
|
// const timer = setInterval(() => {
|
||||||
initData();
|
// initData();
|
||||||
}, 5000);
|
// }, 5000);
|
||||||
|
|
||||||
function showCalendar() {
|
function showCalendar() {
|
||||||
calendarShow.value = true;
|
calendarShow.value = true;
|
||||||
|
|
@ -396,7 +429,9 @@ function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
||||||
}
|
}
|
||||||
|
|
||||||
text {
|
text {
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family:
|
||||||
|
PingFangSC,
|
||||||
|
PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: rgba(255, 255, 255, 0.8);
|
color: rgba(255, 255, 255, 0.8);
|
||||||
|
|
@ -439,7 +474,9 @@ function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_title {
|
.tag_title {
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family:
|
||||||
|
PingFangSC,
|
||||||
|
PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #222222;
|
color: #222222;
|
||||||
|
|
@ -447,7 +484,9 @@ function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_num {
|
.tag_num {
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family:
|
||||||
|
PingFangSC,
|
||||||
|
PingFang SC;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 38rpx;
|
font-size: 38rpx;
|
||||||
color: #222222;
|
color: #222222;
|
||||||
|
|
@ -455,7 +494,9 @@ function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_status {
|
.tag_status {
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family:
|
||||||
|
PingFangSC,
|
||||||
|
PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
|
|
||||||
|
|
@ -223,9 +223,9 @@ function onViewAll(type) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const timer = setInterval(() => {
|
// const timer = setInterval(() => {
|
||||||
initData();
|
// initData();
|
||||||
}, 5000);
|
// }, 5000);
|
||||||
|
|
||||||
const LoginShow = ref(false);
|
const LoginShow = ref(false);
|
||||||
const isLoginStatus = ref();
|
const isLoginStatus = ref();
|
||||||
|
|
@ -350,7 +350,9 @@ onMounted(async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
text {
|
text {
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family:
|
||||||
|
PingFangSC,
|
||||||
|
PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: rgba(255, 255, 255, 0.8);
|
color: rgba(255, 255, 255, 0.8);
|
||||||
|
|
@ -393,7 +395,9 @@ onMounted(async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_title {
|
.tag_title {
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family:
|
||||||
|
PingFangSC,
|
||||||
|
PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #222222;
|
color: #222222;
|
||||||
|
|
@ -401,7 +405,9 @@ onMounted(async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_num {
|
.tag_num {
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family:
|
||||||
|
PingFangSC,
|
||||||
|
PingFang SC;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 38rpx;
|
font-size: 38rpx;
|
||||||
color: #222222;
|
color: #222222;
|
||||||
|
|
@ -409,7 +415,9 @@ onMounted(async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_status {
|
.tag_status {
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family:
|
||||||
|
PingFangSC,
|
||||||
|
PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
|
@ -532,7 +540,9 @@ onMounted(async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.sreach_text {
|
.sreach_text {
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family:
|
||||||
|
PingFangSC,
|
||||||
|
PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue