添加消息类型枚举和相关字段,优化消息记录服务的添加方法,更新多个组件以支持新增分类对话框
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 38s
Docker Build & Deploy / Deploy to Production (push) Successful in 6s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s

This commit is contained in:
孙诚
2026-01-06 13:45:39 +08:00
parent baa77341bc
commit 10b02df6e2
10 changed files with 178 additions and 149 deletions

View File

@@ -49,7 +49,9 @@
height="50%"
:closeable="true"
>
<div class="detail-content">
<div v-if="currentMessage.messageType === 2" class="detail-content" v-html="currentMessage.content">
</div>
<div v-else class="detail-content">
{{ currentMessage.content }}
</div>
</PopupContainer>
@@ -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) => {