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(() => {