+
+
+
{{ currentMessage.content }}
@@ -126,9 +128,6 @@ const onRefresh = () => {
};
const viewDetail = async (item) => {
- currentMessage.value = item;
- detailVisible.value = true;
-
if (!item.isRead) {
try {
await markAsRead(item.id);
@@ -138,6 +137,18 @@ const viewDetail = async (item) => {
console.error('标记已读失败', error);
}
}
+
+ if (item.messageType === 1) {
+ if (item.content.startsWith('http')) {
+ window.open(item.content, '_blank');
+ } else {
+ showToast('无效的URL');
+ }
+ return;
+ }
+
+ currentMessage.value = item;
+ detailVisible.value = true;
};
const handleDelete = (item) => {
diff --git a/Web/src/views/PeriodicRecord.vue b/Web/src/views/PeriodicRecord.vue
index 1d0aa1e..852361b 100644
--- a/Web/src/views/PeriodicRecord.vue
+++ b/Web/src/views/PeriodicRecord.vue
@@ -90,7 +90,7 @@
:title="isEdit ? '编辑周期账单' : '新增周期账单'"
height="85%"
>
-
+
+ 新增
@@ -223,13 +223,12 @@
-
-