feat(admin): 重复批量投递warning提供复制run_id按钮(复用copyToClipboard)

This commit is contained in:
萝卜
2026-03-17 18:32:50 +08:00
parent 7dd2e2e40a
commit e937946011
4 changed files with 74 additions and 2 deletions

View File

@@ -718,6 +718,30 @@
});
})();
// 通用:复制任意文本(用于 flash 提示中的“复制run_id”等
(function(){
var btns = document.querySelectorAll('[data-action="copy-text"][data-copy-text]');
if(!btns || btns.length === 0){return;}
btns.forEach(function(btn){
btn.addEventListener('click', function(){
var text = btn.getAttribute('data-copy-text') || '';
var label = btn.getAttribute('data-copy-label') || '文本';
copyToClipboard(text).then(function(){
markCopied(btn, true);
toastCopied(label, text);
}).catch(function(){
markCopied(btn, false);
if (toastCopyFailed(label, '请手动复制:' + text)) {
return;
}
try { window.alert('复制失败,请手动复制:' + text); } catch (e) {}
});
});
});
})();
// 续费缺订阅治理订单详情页“绑定订阅ID”输入框小交互增强
// - 输入后按 Enter 直接提交
// - 自动聚焦,减少点击