refactor: 优化代码格式并移除无用功能
- 格式化 RankList.vue 和 realtimeInfo/index.vue 中的代码 - 移除 PageTop.vue 中未使用的"编辑精选"菜单项 - 调整资讯列表的 limit_num 参数从 20 改为 1000
This commit is contained in:
parent
9bbf2c10b3
commit
258444e317
|
|
@ -24,7 +24,8 @@
|
|||
<view class="r_r_tags" v-if="hasTag">
|
||||
<view style="display: flex; margin-top: 20rpx; overflow-x: auto; width: 95vw">
|
||||
<view class="r_tags">
|
||||
<view class="tag" style="background-color: #fff9ec; color: #ffb100" v-for="(item, index) in item.conceptLabels" :key="index">{{
|
||||
<view class="tag" style="background-color: #fff9ec; color: #ffb100"
|
||||
v-for="(item, index) in item.conceptLabels" :key="index">{{
|
||||
item
|
||||
}}</view>
|
||||
</view>
|
||||
|
|
@ -32,7 +33,8 @@
|
|||
|
||||
<view style="display: flex; margin-top: 20rpx; overflow-x: auto; width: 100vw">
|
||||
<view class="r_tags">
|
||||
<view class="tag" style="background-color: #f5f8fe; color: #007aff" v-for="(item, index) in item.industryLabels" :key="index">{{
|
||||
<view class="tag" style="background-color: #f5f8fe; color: #007aff"
|
||||
v-for="(item, index) in item.industryLabels" :key="index">{{
|
||||
item
|
||||
}}</view>
|
||||
</view>
|
||||
|
|
@ -51,8 +53,7 @@
|
|||
</view>
|
||||
<text class="score" v-if="needExp">
|
||||
<text v-if="index < 3">资讯评分:</text>
|
||||
{{ item.news_score }}</text
|
||||
>
|
||||
{{ item.news_score }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -65,11 +66,8 @@
|
|||
<img src="@/assets/zixun/down_icon.png" class="exp_up" v-else />
|
||||
</view>
|
||||
|
||||
<LoginPopup
|
||||
:show="LoginShow"
|
||||
@handlePopupClose="handlePopupClose"
|
||||
@handlePopupSuccessCallback="handlePopupSuccessCallback"
|
||||
@handlePopupErrorCallback="handlePopupErrorCallback" />
|
||||
<LoginPopup :show="LoginShow" @handlePopupClose="handlePopupClose"
|
||||
@handlePopupSuccessCallback="handlePopupSuccessCallback" @handlePopupErrorCallback="handlePopupErrorCallback" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -310,11 +308,16 @@ function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
|||
text-align: left;
|
||||
font-style: normal;
|
||||
|
||||
display: -webkit-box; /* 设置为WebKit内核的弹性盒子模型 */
|
||||
-webkit-box-orient: vertical; /* 垂直排列 */
|
||||
-webkit-line-clamp: 2; /* 限制显示三行 */
|
||||
overflow: hidden; /* 隐藏超出范围的内容 */
|
||||
text-overflow: ellipsis; /* 使用省略号 */
|
||||
display: -webkit-box;
|
||||
/* 设置为WebKit内核的弹性盒子模型 */
|
||||
-webkit-box-orient: vertical;
|
||||
/* 垂直排列 */
|
||||
-webkit-line-clamp: 2;
|
||||
/* 限制显示三行 */
|
||||
overflow: hidden;
|
||||
/* 隐藏超出范围的内容 */
|
||||
text-overflow: ellipsis;
|
||||
/* 使用省略号 */
|
||||
}
|
||||
|
||||
.news-meta {
|
||||
|
|
|
|||
|
|
@ -58,7 +58,8 @@
|
|||
<indexMenuTitle title="资讯评分分布区间"></indexMenuTitle>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -66,7 +67,9 @@
|
|||
<view style="background-color: white; margin-top: 40rpx">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<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] }}
|
||||
<u-icon name="calendar" size="26" style="margin-right: 10rpx"></u-icon>
|
||||
</view>
|
||||
|
|
@ -81,7 +84,8 @@
|
|||
</view>
|
||||
|
||||
<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>
|
||||
<view style="display: flex; gap: 3rpx">
|
||||
<text class="view-all" @click="onViewAll(0)">查看全部</text>
|
||||
|
|
@ -93,7 +97,8 @@
|
|||
</view>
|
||||
|
||||
<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>
|
||||
<view style="display: flex; gap: 3rpx">
|
||||
<text class="view-all" @click="onViewAll(1)">查看全部</text>
|
||||
|
|
@ -106,21 +111,11 @@
|
|||
|
||||
<view class="logout" @click="loginOut" v-if="Session.get('token')">退出登录</view>
|
||||
|
||||
<LoginPopup
|
||||
:show="LoginShow"
|
||||
@handlePopupClose="handlePopupClose"
|
||||
@handlePopupSuccessCallback="handlePopupSuccessCallback"
|
||||
@handlePopupErrorCallback="handlePopupErrorCallback" />
|
||||
<LoginPopup :show="LoginShow" @handlePopupClose="handlePopupClose"
|
||||
@handlePopupSuccessCallback="handlePopupSuccessCallback" @handlePopupErrorCallback="handlePopupErrorCallback" />
|
||||
|
||||
<u-calendar
|
||||
:show="calendarShow"
|
||||
min-date="2025-01-01"
|
||||
closeOnClickOverlay
|
||||
:max-date="maxDate"
|
||||
:default-date="chooseDate.startDate"
|
||||
monthNum="12"
|
||||
:key="chooseDate.startDate"
|
||||
@confirm="calendarConfirm"
|
||||
<u-calendar :show="calendarShow" min-date="2025-01-01" closeOnClickOverlay :max-date="maxDate"
|
||||
:default-date="chooseDate.startDate" monthNum="12" :key="chooseDate.startDate" @confirm="calendarConfirm"
|
||||
@close="calendarShow = false">
|
||||
</u-calendar>
|
||||
</view>
|
||||
|
|
@ -208,7 +203,7 @@ async function getNewsList() {
|
|||
end_date: chooseDate.endDate
|
||||
? timeFormat(chooseDate.endDate)
|
||||
: timeFormat(new Date(today.getFullYear(), today.getMonth(), today.getDate(), 12, 0, 0, 0)),
|
||||
limit_num: 20,
|
||||
limit_num: 1000,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@
|
|||
<view class="line" v-if="tabIndex == 3"></view>
|
||||
</view>
|
||||
|
||||
<view class="r_menu_item" @click="tabChange(4)">
|
||||
<!-- <view class="r_menu_item" @click="tabChange(4)">
|
||||
<text class="menu_item">编辑精选</text>
|
||||
<view class="line" v-if="tabIndex == 4"></view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<view @click="logout" v-if="Session.get('token')">
|
||||
|
|
|
|||
Loading…
Reference in New Issue