feat(realtimeInfo): 添加海外先机页面并优化新闻组件样式

- 添加新的海外先机页面路由配置
- 更新banner新闻视图组件的布局样式,修改宽度为710rpx
- 在新闻标签和行业部分添加flex布局支持
- 将热门新闻组件中的文本显示改为block模式
- 移除多余的行高设置,优化文本截断效果
- 更新导航菜单中"海外独家"为"海外先机"
- 修改页脚登出按钮为普通视图元素
- 更新相关图片资源文件
This commit is contained in:
傅光孟 2026-01-29 14:40:22 +08:00
parent 453936dd56
commit c270557c29
9 changed files with 411 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 783 KiB

After

Width:  |  Height:  |  Size: 782 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 697 KiB

After

Width:  |  Height:  |  Size: 684 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@ -75,6 +75,9 @@
},
{
"path": "pages/realtimeInfo/pc/indexPC"
},
{
"path": "pages/foreign/index"
}
],
"globalStyle": {

400
src/pages/foreign/index.vue Normal file
View File

@ -0,0 +1,400 @@
<template>
<view class="page-container">
<!-- 导航栏 start -->
<view class="custom-bav-bar">
<view class="left">
<u-icon name="arrow-left" color="#fff" size="36rpx" @click="back" />
</view>
<view class="center"> 海外先机 </view>
</view>
<!-- 导航栏 end -->
<!-- 标题 start -->
<view class="page-title">
<view class="hide">挖掘核心投资资产 提供决策先手信息</view>
<view class="desc">24小时全球市场实时独家监控</view>
</view>
<!-- 标题 end -->
<view class="page-timeline">
<view class="timeline">
<view class="line"></view>
<view class="content">
<view class="date">2025/11/26</view>
<view class="news-list">
<view class="news">
<view class="news-top">
<view class="time">09:30:00</view>
<view class="source">
<text class="l-1">来自</text>
<text class="t-1">中国证券报</text>
</view>
</view>
<view class="news-title">
<view class="icon-hot"></view>
<view class="name">
<text class="text"
>行业龙头最新财报行业龙头最新财报行业龙头最新财报行业龙头最新财报</text
>
</view>
</view>
<view class="news-content">
英伟达发布2026财年三季度业绩及四季度指引均超市场预期收入方场预期收入方面三亿美元
英伟达发布2026财年三季度业绩及四季度指引均超市场预期收入方场预期收入方面三亿美元
英伟达发布2026财年三季度业绩及四季度指引均超市场预期收入方场预期收入方面三亿美元
</view>
<view class="tags">
<text class="tag">#苹果产业链</text>
<text class="tag">#苹果产业链</text>
</view>
<view class="stocks">
<view class="stock">
<text class="name">工业富联</text>
<text class="code">6011138</text>
</view>
<view class="stock">
<text class="name">工业富联</text>
<text class="code">6011138</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="timeline">
<view class="line"></view>
<view class="content">
<view class="date">2025/11/26</view>
<view class="news-list">
<view class="news">
<view class="news-top">
<view class="time">09:30:00</view>
<view class="source">
<text class="l-1">来自</text>
<text class="t-1">中国证券报</text>
</view>
</view>
<view class="news-title">
<view class="icon-hot"></view>
<view class="name">
<text class="text"
>行业龙头最新财报行业龙头最新财报行业龙头最新财报行业龙头最新财报</text
>
</view>
</view>
<view class="news-content">
英伟达发布2026财年三季度业绩及四季度指引均超市场预期收入方场预期收入方面三亿美元
英伟达发布2026财年三季度业绩及四季度指引均超市场预期收入方场预期收入方面三亿美元
英伟达发布2026财年三季度业绩及四季度指引均超市场预期收入方场预期收入方面三亿美元
</view>
<view class="tags">
<text class="tag">#苹果产业链</text>
<text class="tag">#苹果产业链</text>
</view>
<view class="stocks">
<view class="stock">
<text class="name">工业富联</text>
<text class="code">6011138</text>
</view>
<view class="stock">
<text class="name">工业富联</text>
<text class="code">6011138</text>
</view>
</view>
</view>
<view class="news">
<view class="news-top">
<view class="time">09:30:00</view>
<view class="source">
<text class="l-1">来自</text>
<text class="t-1">中国证券报</text>
</view>
</view>
<view class="news-title">
<view class="icon-hot"></view>
<view class="name">
<text class="text"
>行业龙头最新财报行业龙头最新财报行业龙头最新财报行业龙头最新财报</text
>
</view>
</view>
<view class="news-content">
英伟达发布2026财年三季度业绩及四季度指引均超市场预期收入方场预期收入方面三亿美元
英伟达发布2026财年三季度业绩及四季度指引均超市场预期收入方场预期收入方面三亿美元
英伟达发布2026财年三季度业绩及四季度指引均超市场预期收入方场预期收入方面三亿美元
</view>
<view class="tags">
<text class="tag">#苹果产业链</text>
<text class="tag">#苹果产业链</text>
</view>
<view class="stocks">
<view class="stock">
<text class="name">工业富联</text>
<text class="code">6011138</text>
</view>
<view class="stock">
<text class="name">工业富联</text>
<text class="code">6011138</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { ref } from "vue";
</script>
<style scoped lang="scss">
.page-container {
width: 100%;
background-image: url("@/assets/images/page/page_1@2x.png");
background-size: 100% auto;
background-repeat: no-repeat;
}
.custom-bav-bar {
width: 100%;
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
.back_icon {
width: 36rpx;
height: 36rpx;
}
.logo_icon {
width: 168rpx;
height: 36rpx;
margin-right: 6rpx;
}
.left {
position: absolute;
top: 24rpx;
left: 32rpx;
}
.center {
display: flex;
align-items: center;
justify-content: center;
font-family: "PingFangSC, PingFang SC";
font-weight: 500;
font-size: 34rpx;
color: #ffffff;
line-height: 36rpx;
text-align: center;
}
}
.page-title {
width: 100%;
display: flex;
justify-content: center;
padding-top: 202rpx;
margin-bottom: 54rpx;
.desc {
padding-left: 40rpx;
background: url("@/assets/images/page/icon_select@2x.png") no-repeat 0 center;
background-size: 28rpx 28rpx;
font-family: "PingFangSC, PingFang SC";
font-weight: 400;
font-size: 24rpx;
color: #ffffff;
line-height: 34rpx;
}
.hide {
display: none;
opacity: 0;
}
}
.page-timeline {
width: 100%;
padding: 60rpx 28rpx 0;
background: #f3f5f8;
border-radius: 24rpx 24rpx 0px 0px;
overflow: hidden;
box-sizing: border-box;
.timeline {
display: flex;
.line {
position: relative;
top: 12rpx;
&::after {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 50%;
width: 2rpx;
height: 100%;
background: #d9d7d7;
transform: translateX(-1rpx);
z-index: 1;
}
&::before {
position: relative;
content: "";
display: block;
width: 20rpx;
height: 20rpx;
background: url("@/assets/images/page/icon_cicle@2x.png") no-repeat;
background-size: 20rpx 20rpx;
z-index: 2;
}
}
.content {
padding: 0 0 30rpx 15rpx;
}
.date {
font-family: "PingFangSC, PingFang SC";
font-weight: 500;
font-size: 28rpx;
color: #222222;
line-height: 40rpx;
}
.news-list {
margin-top: 30rpx;
background: #ffffff;
border-radius: 24rpx;
}
.news {
padding: 25rpx 30rpx 10rpx;
box-sizing: border-box;
.news-top {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
.time {
font-family: "PingFangSC, PingFang SC";
font-weight: 400;
font-size: 28rpx;
color: #666666;
line-height: 44rpx;
}
.source {
font-family: "PingFangSC, PingFang SC";
font-weight: 400;
font-size: 24rpx;
color: #222222;
line-height: 33rpx;
.l-1 {
margin-right: 4rpx;
color: #666666;
}
}
}
.news-title {
display: flex;
align-items: center;
margin-bottom: 12rpx;
.icon-hot {
// flex: 1;
width: 63rpx;
height: 32rpx;
margin-right: 10rpx;
background: url("@/assets/images/page/only_icon@2x.png") no-repeat;
background-size: 63rpx 32rpx;
}
.name {
position: relative;
height: 32rpx;
.text {
position: relative;
max-width: 520rpx;
display: block;
font-family: "PingFangSC, PingFang SC";
font-weight: 500;
font-size: 28rpx;
line-height: 32rpx;
color: #222222;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
z-index: 1;
}
}
}
.news-content {
font-family: "PingFangSC, PingFang SC";
font-weight: 400;
font-size: 28rpx;
color: #666666;
line-height: 44rpx;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
}
.tags {
margin-bottom: 20rpx;
.tag {
font-family: "PingFangSC, PingFang SC";
font-weight: 400;
font-size: 24rpx;
color: #5978b2;
line-height: 44rpx;
margin-right: 12rpx;
}
}
.stocks {
display: flex;
align-items: center;
gap: 20rpx;
.stock {
display: flex;
align-items: center;
background: #edf1f5;
border-radius: 25rpx;
padding: 0 18rpx;
.name {
font-family: "PingFangSC, PingFang SC";
font-weight: 400;
font-size: 24rpx;
color: #666666;
line-height: 44rpx;
}
.code {
margin-left: 20rpx;
font-family: "PingFangSC, PingFang SC";
font-weight: 400;
font-size: 24rpx;
color: #999999;
line-height: 44rpx;
}
}
}
}
}
</style>

View File

@ -57,6 +57,8 @@
</view>
<view class="industry">
<text class="txt">**能源</text>
<text class="txt">**能源</text>
<text class="txt">**能源</text>
</view>
</view>
</swiper-item>
@ -70,7 +72,7 @@ import { ref } from "vue";
<style scoped lang="scss">
.news-section {
width: 100%;
width: 710rpx;
height: 522rpx;
margin: 0 20rpx 20rpx;
padding: 87rpx 54rpx 0 24rpx;
@ -147,6 +149,7 @@ import { ref } from "vue";
word-break: break-all;
}
.tag {
display: flex;
margin-bottom: 22rpx;
.txt {
margin-right: 16rpx;
@ -158,6 +161,7 @@ import { ref } from "vue";
}
}
.industry {
display: flex;
.txt {
padding: 8rpx 12rpx;
background: #ffffff;

View File

@ -1,6 +1,6 @@
<template>
<view class="footer">
<button class="logout">退出登录</button>
<view class="logout">退出登录</view>
</view>
</template>

View File

@ -23,7 +23,7 @@ import MENUICON5 from "@/assets/images/page/icon_5@2x.png";
const menus = reactive([
{
name: "海外独家",
name: "海外先机",
icon: MENUICON1,
},
{

View File

@ -146,7 +146,7 @@ const active = ref(0);
.text {
position: relative;
max-width: 500rpx;
display: inline-block;
display: block;
font-family: "PingFangSC, PingFang SC";
font-weight: 500;
font-size: 28rpx;
@ -178,7 +178,6 @@ const active = ref(0);
font-size: 24rpx;
color: #343636;
line-height: 33rpx;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;