From 34f5733bc1f126c572580fa849b9403dfcddd84b Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期二, 03 二月 2026 10:29:41 +0800
Subject: [PATCH] 通知列表
---
src/views/main/home/index.vue | 31 ++++++++++++++++++++++---------
1 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/src/views/main/home/index.vue b/src/views/main/home/index.vue
index 355c457..850d37d 100644
--- a/src/views/main/home/index.vue
+++ b/src/views/main/home/index.vue
@@ -7,16 +7,15 @@
</el-image>
<div class="main-content">
<el-row justify="space-between">
- <el-card
+ <div
v-for="(item,index) in operationList"
:key="`operation${index}`"
- shadow="hover"
- style="max-width: 270px;"
- class="cursor-p my-4"
+ class="cursor-p my-4 p-0"
+ @click="goOperationPage(item)"
>
- <el-image :src="$getImageUrl(`/home/${item.value}.png`)">
+ <el-image style="max-width: 270px;" :src="$getImageUrl(`/home/${item.value}.png`)">
</el-image>
- </el-card>
+ </div>
</el-row>
<el-row justify="space-between" class="py-2" style="border-bottom: 2px solid var(--el-color-primary);">
@@ -24,7 +23,7 @@
<span style="color: var(--el-color-primary);">閫氱煡</span>
<span>鍏憡</span>
</el-text>
- <el-button text type="primary">鏌ョ湅鍏ㄩ儴>></el-button>
+ <el-button text type="primary" @click="goNoticeList()">鏌ョ湅鍏ㄩ儴>></el-button>
</el-row>
<el-card
@@ -42,7 +41,7 @@
</el-row>
</div>
<div>
- <el-button text type="primary">鐐瑰嚮鏌ョ湅璇︽儏>></el-button>
+ <el-button text type="primary" @click="goNoticeDetail(notice.id)">鐐瑰嚮鏌ョ湅璇︽儏>></el-button>
</div>
</el-row>
</el-card>
@@ -64,7 +63,7 @@
{ name: "鎴愮哗鏌ヨ", value: 'score' },
{ name: "璇佷功鏌ヨ", value: 'certificate' },
],
- noticeList: []
+ noticeList: [],
}
},
created() {
@@ -76,32 +75,46 @@
this.noticeList =
[
{
+ id: '1',
title: "鍏充簬鍏竷2024骞村箍涓滅渷浜ф暀璇勬妧鑳界敓鎬侀摼閾句富鍩硅偛鍗曚綅鍏ラ�夊悕鍗曠殑閫氱煡",
publishTime: '2024-07-12 14:24:33',
area: '骞夸笢鐪�',
},
{
+ id: '2',
title: "鍏充簬鍏竷2024骞村箍涓滅渷浜ф暀璇勬妧鑳界敓鎬侀摼閾句富鍩硅偛鍗曚綅鍏ラ�夊悕鍗曠殑閫氱煡",
publishTime: '2024-07-12 14:24:33',
area: '骞夸笢鐪�',
},
{
+ id: '3',
title: "鍏充簬鍏竷2024骞村箍涓滅渷浜ф暀璇勬妧鑳界敓鎬侀摼閾句富鍩硅偛鍗曚綅鍏ラ�夊悕鍗曠殑閫氱煡",
publishTime: '2024-07-12 14:24:33',
area: '骞夸笢鐪�',
},
{
+ id: '4',
title: "鍏充簬鍏竷2024骞村箍涓滅渷浜ф暀璇勬妧鑳界敓鎬侀摼閾句富鍩硅偛鍗曚綅鍏ラ�夊悕鍗曠殑閫氱煡",
publishTime: '2024-07-12 14:24:33',
area: '骞夸笢鐪�',
},
{
+ id: '5',
title: "鍏充簬鍏竷2024骞村箍涓滅渷浜ф暀璇勬妧鑳界敓鎬侀摼閾句富鍩硅偛鍗曚綅鍏ラ�夊悕鍗曠殑閫氱煡",
publishTime: '2024-07-12 14:24:33',
area: '骞夸笢鐪�',
},
]
}, 400)
+ },
+ goNoticeDetail(id) {
+ this.$router.push(`/main/noticeDetail/${id}`)
+ },
+ goNoticeList() {
+ this.$router.push('/main/noticeList')
+ },
+ goOperationPage(item) {
+ this.$router.push(`/main/${item.value}`)
}
}
}
--
Gitblit v1.8.0