deploy: 2026-07-15 15:35 部署更新
This commit is contained in:
+29
-20
@@ -1287,7 +1287,7 @@ function renderMarkdown(md) {
|
|||||||
liContent = liContent.replace(/^<strong class="font-semibold text-gray-900">销售话术<\/strong>[::]?\s*/, '');
|
liContent = liContent.replace(/^<strong class="font-semibold text-gray-900">销售话术<\/strong>[::]?\s*/, '');
|
||||||
const scriptId = 'script-' + Math.random().toString(36).slice(2, 9);
|
const scriptId = 'script-' + Math.random().toString(36).slice(2, 9);
|
||||||
html += `<li class="text-gray-700 list-none ml-0">
|
html += `<li class="text-gray-700 list-none ml-0">
|
||||||
<div class="script-card border-l-4 border-green-500 bg-green-50 rounded-r-lg px-4 py-3 my-2 shadow-sm" id="${scriptId}">
|
<div class="script-card border border-green-300 bg-green-50 rounded-lg px-4 py-3 my-2 shadow-sm" id="${scriptId}">
|
||||||
<div class="flex items-center justify-between mb-1.5">
|
<div class="flex items-center justify-between mb-1.5">
|
||||||
<span class="text-xs font-semibold text-green-800 flex items-center gap-1">
|
<span class="text-xs font-semibold text-green-800 flex items-center gap-1">
|
||||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"/></svg>
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"/></svg>
|
||||||
@@ -1305,7 +1305,7 @@ function renderMarkdown(md) {
|
|||||||
// 预期回应:灰色信息块
|
// 预期回应:灰色信息块
|
||||||
liContent = liContent.replace(/^<strong class="font-semibold text-gray-900">预期回应<\/strong>[::]?\s*/, '');
|
liContent = liContent.replace(/^<strong class="font-semibold text-gray-900">预期回应<\/strong>[::]?\s*/, '');
|
||||||
html += `<li class="text-gray-700 list-none ml-0">
|
html += `<li class="text-gray-700 list-none ml-0">
|
||||||
<div class="border-l-4 border-gray-300 bg-gray-50 rounded-r-lg px-4 py-3 my-2">
|
<div class="border border-gray-200 bg-gray-50 rounded-lg px-4 py-3 my-2">
|
||||||
<div class="text-xs font-semibold text-gray-500 mb-1.5 flex items-center gap-1">
|
<div class="text-xs font-semibold text-gray-500 mb-1.5 flex items-center gap-1">
|
||||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h18M7 15h12M7 20h12"/></svg>
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h18M7 15h12M7 20h12"/></svg>
|
||||||
预期回应
|
预期回应
|
||||||
@@ -1317,7 +1317,7 @@ function renderMarkdown(md) {
|
|||||||
// 技巧提示:黄色提示块
|
// 技巧提示:黄色提示块
|
||||||
liContent = liContent.replace(/^<strong class="font-semibold text-gray-900">技巧提示<\/strong>[::]?\s*/, '');
|
liContent = liContent.replace(/^<strong class="font-semibold text-gray-900">技巧提示<\/strong>[::]?\s*/, '');
|
||||||
html += `<li class="text-gray-700 list-none ml-0">
|
html += `<li class="text-gray-700 list-none ml-0">
|
||||||
<div class="border-l-4 border-amber-400 bg-amber-50 rounded-r-lg px-4 py-3 my-2">
|
<div class="border border-amber-200 bg-amber-50 rounded-lg px-4 py-3 my-2">
|
||||||
<div class="text-xs font-semibold text-amber-700 mb-1.5 flex items-center gap-1">
|
<div class="text-xs font-semibold text-amber-700 mb-1.5 flex items-center gap-1">
|
||||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"/></svg>
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"/></svg>
|
||||||
技巧提示
|
技巧提示
|
||||||
@@ -1356,30 +1356,39 @@ function inlineMd(text) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 复制销售话术到剪贴板,并显示 toast 提示 */
|
/** 复制销售话术到剪贴板,并显示 toast 提示 */
|
||||||
|
/** 降级复制方案:使用临时 textarea + execCommand */
|
||||||
|
function fallbackCopy(text) {
|
||||||
|
const textarea = document.createElement('textarea');
|
||||||
|
textarea.value = text;
|
||||||
|
textarea.style.position = 'fixed';
|
||||||
|
textarea.style.opacity = '0';
|
||||||
|
document.body.appendChild(textarea);
|
||||||
|
textarea.select();
|
||||||
|
try {
|
||||||
|
document.execCommand('copy');
|
||||||
|
showToast('话术已复制', 'success');
|
||||||
|
} catch (e) {
|
||||||
|
showToast('复制失败,请手动选择文本', 'error');
|
||||||
|
}
|
||||||
|
document.body.removeChild(textarea);
|
||||||
|
}
|
||||||
|
|
||||||
function copyScript(scriptId) {
|
function copyScript(scriptId) {
|
||||||
const el = document.getElementById(scriptId);
|
const el = document.getElementById(scriptId);
|
||||||
if (!el) return;
|
if (!el) return;
|
||||||
const contentEl = el.querySelector('.script-content');
|
const contentEl = el.querySelector('.script-content');
|
||||||
if (!contentEl) return;
|
if (!contentEl) return;
|
||||||
const text = contentEl.innerText.trim();
|
const text = contentEl.innerText.trim();
|
||||||
navigator.clipboard.writeText(text).then(() => {
|
// HTTP 环境下 navigator.clipboard 为 undefined,优先使用 execCommand 降级方案
|
||||||
showToast('话术已复制', 'success');
|
if (navigator.clipboard && navigator.clipboard.writeText) {
|
||||||
}).catch(() => {
|
navigator.clipboard.writeText(text).then(() => {
|
||||||
// 降级方案:使用临时 textarea
|
|
||||||
const textarea = document.createElement('textarea');
|
|
||||||
textarea.value = text;
|
|
||||||
textarea.style.position = 'fixed';
|
|
||||||
textarea.style.opacity = '0';
|
|
||||||
document.body.appendChild(textarea);
|
|
||||||
textarea.select();
|
|
||||||
try {
|
|
||||||
document.execCommand('copy');
|
|
||||||
showToast('话术已复制', 'success');
|
showToast('话术已复制', 'success');
|
||||||
} catch (e) {
|
}).catch(() => {
|
||||||
showToast('复制失败,请手动选择文本', 'error');
|
fallbackCopy(text);
|
||||||
}
|
});
|
||||||
document.body.removeChild(textarea);
|
} else {
|
||||||
});
|
fallbackCopy(text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 轻量 toast 提示 */
|
/** 轻量 toast 提示 */
|
||||||
|
|||||||
Reference in New Issue
Block a user