From 072adeaa9a703b506792ef769be80d6f0a631c90 Mon Sep 17 00:00:00 2001
From: lld <15027638633@163.com>
Date: Wed, 25 Mar 2026 19:56:13 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E4=B8=AD=E5=BF=83=E6=9A=82?=
=?UTF-8?q?=E6=97=B6=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/news/index.vue | 520 +++++++++++++++++++++----------------------
1 file changed, 260 insertions(+), 260 deletions(-)
diff --git a/pages/news/index.vue b/pages/news/index.vue
index 6518fba..be76f30 100644
--- a/pages/news/index.vue
+++ b/pages/news/index.vue
@@ -1,38 +1,66 @@
-
-
+
+
+ 小策技术
+ ▶
- -->
-
-
-
-
-
-
- {{ msg.preview }}
-
-
- {{ msg.unreadCount }}
-
+
+ 清除未读
+ |
+ 通知设置
-
-
- 加载中...
-
-
-
-
-
-
- 暂无消息
+
+
+
+
+ ✕
+ 系统通知未开启,报警消息无法通知
+
+ 去开启
+
+
+
+
+
+ 🗨️
+ 消息订阅
+ 成员收不到设备/应用消息?
+
+
+ 🤖
+ AI识别
+ AI识别精准过滤无效报警
+
+
+
+
+
+
+
+
+ {{ item.icon }}
+
+
+
+
+ {{ item.title }}
+ {{ item.desc }}
+
+ {{ item.time }}
+
+
+
+
+ 只展示最近7天的消息
+
@@ -40,260 +68,232 @@
export default {
data() {
return {
- currentTab: 0,
- navItems: [{
- title: '评论',
- icon: 'https://www.zenkuai.com/attachment/demo/1.png',
- count: 5
- },
+ messageList: [
{
- title: '粉丝',
- icon: 'https://www.zenkuai.com/attachment/demo/2.png',
- count: 2
+ icon: '🎬',
+ iconBg: '#4285F4',
+ title: '视频中心',
+ desc: '[画面变化] DS-2DE4423DW-D/GLT/XM(FW1167...',
+ time: '11:51',
+ badge: true
},
{
- title: '点赞',
- icon: 'https://www.zenkuai.com/attachment/demo/2.png',
- count: 10
+ icon: '🖥️',
+ iconBg: '#4285F4',
+ title: '设备状态',
+ desc: '[设备在线] 十方',
+ time: '26/03/21',
+ badge: true
+ },
+ {
+ icon: '🔔',
+ iconBg: '#FFA726',
+ title: '系统通知',
+ desc: '没有新的消息',
+ time: '',
+ badge: false
}
- ],
- searchText: '',
- messages: [
- {
- id: 1,
- sender: '系统通知',
- avatar: 'https://img.xiaoces.com/photos/news.png',
- preview: '您有一条新的系统通知,请查看',
- time: '10:30',
- unread: true,
- unreadCount: 1
- },
- {
- id: 2,
- sender: '告警中心',
- avatar: 'https://img.xiaoces.com/photos/alarm.png',
- preview: '您有一条新告警->',
- time: '昨天',
- unread: false,
- unreadCount: 0
- },
- {
- id: 3,
- sender: '客服小美',
- avatar: 'https://img.xiaoces.com/photos/cs.png',
- preview: '您好,请问有什么可以帮到您的吗?',
- time: '昨天',
- unread: false,
- unreadCount: 0
- },
- // 可以添加更多消息数据
- ],
- isLoading: false
- }
- },
- computed: {
- filteredMessages() {
- return this.messages.filter(msg =>
- msg.sender.toLowerCase().includes(this.searchText.toLowerCase()) ||
- msg.preview.toLowerCase().includes(this.searchText.toLowerCase())
- )
+ ]
}
},
methods: {
- switchTab(index) {
- this.currentTab = index;
- // 这里可以根据选中的标签加载相应的消息数据
- console.log('Switched to tab:', this.navItems[index].title);
+ navBack() {
+ console.log('返回上一页')
},
- onMessageTap(msg) {
- console.log('Message tapped:', msg)
- uni.navigateTo({
- url: `/pages/message-detail/message-detail?id=${msg.id}`
- })
+ clearUnread() {
+ console.log('清除未读')
},
- loadMore() {
- if (this.isLoading) return
- this.isLoading = true
- // 模拟加载更多消息
- setTimeout(() => {
- // 这里应该是从服务器加载更多消息的逻辑
- this.messages.push(...[{
- id: this.messages.length + 1,
- sender: '新消息',
- avatar: 'https://www.zenkuai.com/attachment/demo/1.png',
- preview: '这是一条新加载的消息',
- time: '刚刚',
- unread: true,
- unreadCount: 1
- }])
- this.isLoading = false
- }, 1000)
+ openSetting() {
+ console.log('打开通知设置')
+ },
+ goToOpen() {
+ console.log('去开启系统通知')
+ },
+ goToSubscribe() {
+ console.log('进入消息订阅')
+ },
+ goToAI() {
+ console.log('进入AI识别')
+ },
+ handleItemClick(item) {
+ console.log('点击消息:', item.title)
+ },
+ switchTab(tab) {
+ console.log('切换到:', tab)
+ // 实际项目中用 uni.switchTab 跳转对应页面
}
}
}
-
\ No newline at end of file