From ad128ef94edae254fb5eb6d319c8a44ecc3344c1 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 Aug 2026 02:29:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E4=BA=86=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/cms-download.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/assets/js/cms-download.js b/assets/js/cms-download.js index 83995302..148d7526 100644 --- a/assets/js/cms-download.js +++ b/assets/js/cms-download.js @@ -252,10 +252,6 @@ } // ===== 成功渲染 ===== - function metaChip(icon, label) { - return '' + escapeHtml(label) + ''; - } - function renderSuccess(payload, returnFocusEl) { payload = payload || {}; const code = String(payload.extract_code || '').trim(); @@ -266,6 +262,8 @@ ? Math.max(1, Math.round(payload.expires_in / 60)) : 10; + const hintMsg = '点击下方按钮开始下载,链接 ' + expiresIn + ' 分钟内有效。'; + let body = ''; if (code !== '') { body += @@ -275,11 +273,12 @@ ' ' + safeCode + '' + ' ' + ' ' + - ''; + '' + + '

' + escapeHtml(hintMsg) + '

'; } else if (has) { body += '

下载源标记了提取码,但接口未返回具体内容,请检查资源下载源的 extract_code 字段。

'; } else { - body += '

点击下方按钮开始下载,文件请及时保存到本地。

'; + body += '

' + escapeHtml(hintMsg) + '

'; } const chips = []; @@ -287,11 +286,9 @@ if (sourceLabel !== '') { chips.push('' + escapeHtml(sourceLabel) + ''); } - chips.push(metaChip('fa-clock', '链接 ' + expiresIn + ' 分钟内有效')); - if (typeof payload.balance === 'number') { - chips.push(metaChip('fa-coins', '积分余额 ' + payload.balance)); + if (chips.length) { + body += '
' + chips.join('') + '
'; } - body += '
' + chips.join('') + '
'; open( dlView('success', {