Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
f08486b0
提交
f08486b0
authored
4月 16, 2026
作者:
hsx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复新闻领域分类布局
上级
42dc6b52
流水线
#530
已通过 于阶段
in 1 分 45 秒
变更
1
流水线
1
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
41 行增加
和
23 行删除
+41
-23
NewsMain.vue
src/views/newsBrief/NewsMain.vue
+41
-23
没有找到文件。
src/views/newsBrief/NewsMain.vue
浏览文件 @
f08486b0
<
template
>
<
template
>
<el-space
direction=
"vertical"
class=
"full-width"
:size=
24
>
<el-space
direction=
"vertical"
class=
"full-width"
:size=
"24"
>
<el-radio-group
class=
"radio-group-as-radius-btn"
>
<el-radio-group
class=
"radio-group-as-radius-btn top-radio-box"
>
<el-space>
<el-space
wrap
>
<el-radio-button
v-for=
"item in moduleList"
:key=
"item.moduleId"
:value=
"item.moduleId"
<el-radio-button
@
click=
"() => gotoNewsModule(item.moduleId, item.moduleName, false)"
>
{{
v-for=
"item in moduleList"
item
.
moduleName
:key=
"item.moduleId"
}}
>
</el-radio-button>
:value=
"item.moduleId"
@
click=
"() => gotoNewsModule(item.moduleId, item.moduleName, false)"
>
{{
item
.
moduleName
}}
>
</el-radio-button
>
<!--
<el-radio-button
value=
"nul"
><img
src=
"@/assets/icons/adjustment.png"
/></el-radio-button>
-->
<!--
<el-radio-button
value=
"nul"
><img
src=
"@/assets/icons/adjustment.png"
/></el-radio-button>
-->
</el-space>
</el-space>
</el-radio-group>
</el-radio-group>
...
@@ -26,44 +29,57 @@
...
@@ -26,44 +29,57 @@
</
template
>
</
template
>
<el-space
:size=
"16"
direction=
"vertical"
fill
class=
"full-width common-padding"
>
<el-space
:size=
"16"
direction=
"vertical"
fill
class=
"full-width common-padding"
>
<el-space
v-for=
"(item, index) in subjectData.slice(0, 3)"
:key=
"index"
<el-space
@
click=
"() => gotoNewsDetail(item.newsId)"
alignment=
"center"
>
v-for=
"(item, index) in subjectData.slice(0, 3)"
<common-text
class=
"text-bold text-hover"
:key=
"index"
:color=
"index === 0 ? 'var(--color-red-100)' : (index === 1 ? 'var(--color-orange-100)' : 'var(--text-primary-65-color)')"
>
@
click=
"() => gotoNewsDetail(item.newsId)"
alignment=
"center"
>
<common-text
class=
"text-bold text-hover"
:color=
"
index === 0
? 'var(--color-red-100)'
: index === 1
? 'var(--color-orange-100)'
: 'var(--text-primary-65-color)'
"
>
{{ `${index + 1}` }}
{{ `${index + 1}` }}
</common-text>
</common-text>
<common-text
class=
"text-bold text-hover"
color=
"var(--text-primary-80-color)"
>
{{
<common-text
class=
"text-bold text-hover"
color=
"var(--text-primary-80-color)"
>
{{
item.newsTitle
item.newsTitle
}}
</common-text>
}}
</common-text>
</el-space>
</el-space>
<el-space
v-for=
"(item, index) in subjectData.slice(3)"
:key=
"index"
<el-space
@
click=
"() => gotoNewsDetail(item.newsId)"
>
v-for=
"(item, index) in subjectData.slice(3)"
:key=
"index"
@
click=
"() => gotoNewsDetail(item.newsId)"
>
<common-text
class=
"text-regular text-hover"
color=
"var(--text-primary-80-color)"
>
{{
<common-text
class=
"text-regular text-hover"
color=
"var(--text-primary-80-color)"
>
{{
"• " + item.newsTitle
"• " + item.newsTitle
}}
</common-text>
}}
</common-text>
</el-space>
</el-space>
</el-space>
</el-space>
</box-background>
</box-background>
</el-space>
</el-space>
</el-space>
</el-space>
</template>
</template>
<
script
setup
>
<
script
setup
>
import
{
ref
,
onMounted
}
from
"vue"
;
import
{
ref
,
onMounted
}
from
"vue"
;
import
'@/styles/common.scss'
;
import
"@/styles/common.scss"
;
import
'@/styles/container.scss'
;
import
"@/styles/container.scss"
;
import
'@/styles/radio.scss'
;
import
"@/styles/radio.scss"
;
import
{
useGotoNewsModule
,
useGotoNewsDetail
}
from
"@/router/modules/news"
;
import
{
useGotoNewsModule
,
useGotoNewsDetail
}
from
"@/router/modules/news"
;
import
{
getMoudleType
,
getTodayNews
,
getHotNews
}
from
"@/api/news/newsBrief"
;
import
{
getMoudleType
,
getTodayNews
,
getHotNews
}
from
"@/api/news/newsBrief"
;
import
{
ElInput
,
ElSpace
,
ElImage
,
ElDivider
,
ElCol
,
ElRow
,
ElRadioButton
,
ElRadioGroup
}
from
"element-plus"
;
import
{
ElInput
,
ElSpace
,
ElImage
,
ElDivider
,
ElCol
,
ElRow
,
ElRadioButton
,
ElRadioGroup
}
from
"element-plus"
;
import
CommonText
from
"@/components/base/texts/CommonText.vue"
;
import
CommonText
from
"@/components/base/texts/CommonText.vue"
;
import
BoxBackground
from
'@/components/base/boxBackground/overviewNormalBox.vue'
import
BoxBackground
from
"@/components/base/boxBackground/overviewNormalBox.vue"
;
import
NewsList
from
"./NewsList.vue"
;
import
NewsList
from
"./NewsList.vue"
;
//博弈专题新闻数据
//博弈专题新闻数据
const
subjectData
=
ref
([]);
const
subjectData
=
ref
([]);
// 今日要闻
// 今日要闻
const
HeadlinesData
=
ref
([
const
HeadlinesData
=
ref
([]);
]);
const
moduleList
=
ref
([]);
const
moduleList
=
ref
([]);
const
gotoNewsDetail
=
useGotoNewsDetail
();
const
gotoNewsDetail
=
useGotoNewsDetail
();
const
gotoNewsModule
=
useGotoNewsModule
();
const
gotoNewsModule
=
useGotoNewsModule
();
...
@@ -78,7 +94,7 @@ const handleGetModuleType = async () => {
...
@@ -78,7 +94,7 @@ const handleGetModuleType = async () => {
if
(
res
.
code
===
200
&&
res
.
data
)
{
if
(
res
.
code
===
200
&&
res
.
data
)
{
moduleList
.
value
=
res
.
data
;
moduleList
.
value
=
res
.
data
;
}
}
}
catch
(
error
)
{
}
}
catch
(
error
)
{
}
};
};
async
function
updateToday
()
{
async
function
updateToday
()
{
...
@@ -90,15 +106,17 @@ async function updateHotNews() {
...
@@ -90,15 +106,17 @@ async function updateHotNews() {
subjectData
.
value
=
hotNews
??
[];
subjectData
.
value
=
hotNews
??
[];
}
}
async
function
initData
()
{
async
function
initData
()
{
await
handleGetModuleType
();
await
handleGetModuleType
();
await
updateToday
();
await
updateToday
();
await
updateHotNews
();
await
updateHotNews
();
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
url("./style.css")
;
@import
url("./style.css")
;
.top-radio-box
{
margin
:
0
80px
;
}
</
style
>
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论