From cce5eda1be339f42154b7a1fc231bab34567dffe Mon Sep 17 00:00:00 2001
From: WindowBird <13870814+windows-bird@user.noreply.gitee.com>
Date: Wed, 19 Nov 2025 11:06:04 +0800
Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=91=8A=E8=AF=A6=E7=BB=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/dashboard.js | 13 +
components/index/ContentDashboard.vue | 5 +
pages.json | 6 +
pages/notice/detail/index.vue | 611 ++++++++++++++++++++++++++
pages/notice/list/index.vue | 5 +-
5 files changed, 638 insertions(+), 2 deletions(-)
create mode 100644 pages/notice/detail/index.vue
diff --git a/api/dashboard.js b/api/dashboard.js
index e40a5fe..cd80fed 100644
--- a/api/dashboard.js
+++ b/api/dashboard.js
@@ -99,3 +99,16 @@ export const getNoticeList = (params = {}) => {
});
};
+/**
+ * 获取公告详情
+ * @param {string} id 公告ID
+ * @returns {Promise} 返回公告详情
+ */
+export const getNoticeDetail = (id) => {
+ return uni.$uv.http.get(`bst/notice/${id}`, {
+ custom: {
+ auth: true // 启用 token 认证
+ }
+ });
+};
+
diff --git a/components/index/ContentDashboard.vue b/components/index/ContentDashboard.vue
index a685a3b..4e0c949 100644
--- a/components/index/ContentDashboard.vue
+++ b/components/index/ContentDashboard.vue
@@ -90,6 +90,7 @@
置顶
重要
+ 紧急
@@ -845,6 +846,10 @@ const getTagCustomStyle = (status) => {
background-color: #ff9800;
}
+.tag-urgent {
+ background-color: #f56c6c;
+}
+
.announcement-meta {
display: flex;
align-items: center;
diff --git a/pages.json b/pages.json
index 28663d5..d42dd4e 100644
--- a/pages.json
+++ b/pages.json
@@ -156,6 +156,12 @@
"style": {
"navigationBarTitleText": "公告列表"
}
+ },
+ {
+ "path": "pages/notice/detail/index",
+ "style": {
+ "navigationBarTitleText": "公告详情"
+ }
}
],
diff --git a/pages/notice/detail/index.vue b/pages/notice/detail/index.vue
new file mode 100644
index 0000000..6b3ba0a
--- /dev/null
+++ b/pages/notice/detail/index.vue
@@ -0,0 +1,611 @@
+
+
+
+
+
+
+
+
+
+ {{ noticeDetail.content || '' }}
+
+
+
+
+
+ 接收信息
+
+
+
+ 接收用户:
+
+
+
+
+ {{ user.nickName?.charAt(0) || '?' }}
+
+ {{ user.nickName || user.userName || '未知' }}
+
+
+
+
+
+
+ 接收部门:
+
+
+ {{ dept.deptName }}
+
+
+
+
+
+
+
+ 附件
+
+
+
+
+
+
+
+
+
+
+
+ {{ getFileIcon(attach.name || attach) }}
+
+ {{ attach.name || attach }}
+ {{ formatFileSize(attach.size) }}
+
+ 下载
+
+
+
+
+
+
+ 加载中...
+
+
+
+
+
+
+
+
+
diff --git a/pages/notice/list/index.vue b/pages/notice/list/index.vue
index ca5ad94..429b1c6 100644
--- a/pages/notice/list/index.vue
+++ b/pages/notice/list/index.vue
@@ -309,8 +309,9 @@ const formatTime = (timeStr) => {
// 跳转到公告详情
const goToNoticeDetail = (notice) => {
- // TODO: 跳转到详情页
- console.log('查看公告详情:', notice);
+ uni.navigateTo({
+ url: `/pages/notice/detail/index?id=${notice.id}`
+ });
};
onMounted(() => {