From f6e5d1ec58970be9826d13e0c97e92f4179874f4 Mon Sep 17 00:00:00 2001 From: 15976874561 <2553956742@qq.com> Date: Wed, 10 Dec 2025 10:13:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9A=84=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../routine/NotificationManagement/index.vue | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/views/routine/NotificationManagement/index.vue b/src/views/routine/NotificationManagement/index.vue index 93c1783..bf7296a 100644 --- a/src/views/routine/NotificationManagement/index.vue +++ b/src/views/routine/NotificationManagement/index.vue @@ -233,22 +233,13 @@ export default { // 新增操作 if (this.form.sendType === 'grade') { // 按年级发送 - // 创建一个临时div来提取纯文本 - const tempDiv = document.createElement('div') - tempDiv.innerHTML = this.form.content - // 将可能存在的 a 标签转换为 markdown 链接,其他标签去除 - const html = this.form.content || '' - const md = this.convertHtmlLinkToMarkdown(html) - const plainText = md !== null ? md : (tempDiv.textContent || tempDiv.innerText || '') - - // 提取标题的纯文本 - const titleDiv = document.createElement('div') - titleDiv.innerHTML = this.form.title || '' - const plainTitle = titleDiv.textContent || titleDiv.innerText || '' + // 直接发送原始内容,保留用户输入的 标签,以便后端存入数据库并转换为 Markdown 发送给企业微信 + const content = this.form.content || '' + const title = this.form.title || '' const data = { - title: plainTitle, - content: plainText, + title: title, + content: content, selectedGrades: this.form.selectedGrades } sendNotificationByGrades(data).then(response => {