|
|
@@ -443,156 +443,174 @@
|
|
|
<h1>系统设置</h1>
|
|
|
<div class="sub">API 密钥与采集配置,保存后立即生效</div>
|
|
|
</div>
|
|
|
- <div class="toolbar">
|
|
|
- <span id="settingsStatus" class="badge"></span>
|
|
|
- <button class="btn btn-primary btn-small" id="btnSaveSettings">保存设置</button>
|
|
|
- </div>
|
|
|
+
|
|
|
</div>
|
|
|
<div class="settings-workspace">
|
|
|
- <div class="settings-forms">
|
|
|
- <div class="panel panel-narrow">
|
|
|
- <div class="stage-marker">
|
|
|
- <span class="num">1</span><span>API 设置</span>
|
|
|
- <div class="seg-control settings-api-tabs" id="settingsApiTabs" role="tablist">
|
|
|
- <button type="button" class="active" data-tab="image">图像模型</button>
|
|
|
- <button type="button" data-tab="chat">对话模型</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <span class="panel-watermark"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="7.5" cy="15.5" r="4.5"/><path d="M11 12L21 2"/><path d="M16 7l3 3"/></svg></span>
|
|
|
- <div class="panel-body">
|
|
|
- <div id="settingsTabImage" class="settings-tab-body" role="tabpanel">
|
|
|
- <div class="field">
|
|
|
- <div class="field-label-row">
|
|
|
- <label>API Key<span class="req">*</span></label>
|
|
|
- <span class="label-links">
|
|
|
- <a class="settings-link settings-link-compact" href="https://o-hubs.com/api/console/keys" target="_blank" rel="noopener noreferrer">
|
|
|
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="7.5" cy="15.5" r="4.5"/><path d="M11 12L21 2"/><path d="M16 7l3 3"/></svg>
|
|
|
- <span>获取 API Key</span>
|
|
|
- </a>
|
|
|
- <a class="settings-link settings-link-compact" href="https://o-hubs.com/home" target="_blank" rel="noopener noreferrer">
|
|
|
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="6" width="18" height="13" rx="3"/><path d="M3 10h18"/><path d="M7 15h3"/></svg>
|
|
|
- <span>充值</span>
|
|
|
- </a>
|
|
|
- </span>
|
|
|
+ <div class="settings-col">
|
|
|
+ <div class="panel panel-narrow">
|
|
|
+ <div class="stage-marker">
|
|
|
+ <span class="num">1</span><span>API 设置</span>
|
|
|
+ <div class="seg-control settings-api-tabs" id="settingsApiTabs" role="tablist">
|
|
|
+ <button type="button" class="active" data-tab="image">图像模型</button>
|
|
|
+ <button type="button" data-tab="chat">对话模型</button>
|
|
|
</div>
|
|
|
- <input type="text" id="settingsApiKey" placeholder="sk-...">
|
|
|
- </div>
|
|
|
- <div class="field">
|
|
|
- <label>API 地址</label>
|
|
|
- <input type="text" id="settingsApiBase" value="https://api.lk888.ai" disabled>
|
|
|
- </div>
|
|
|
- <div class="field">
|
|
|
- <label>默认模型</label>
|
|
|
- <select id="settingsModel"></select>
|
|
|
- </div>
|
|
|
- <div class="settings-links">
|
|
|
- <button type="button" class="settings-link settings-link-btn" id="btnTestImage">
|
|
|
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 12a8 8 0 1 1-2.3-5.6"/><path d="M20 4v5h-5"/></svg>
|
|
|
- <span>测试 API 与模型</span>
|
|
|
- </button>
|
|
|
- <span id="imageTestStatus" class="badge"></span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div id="settingsTabChat" class="settings-tab-body" role="tabpanel" hidden>
|
|
|
- <div class="field">
|
|
|
- <label>API Key</label>
|
|
|
- <input type="text" id="settingsChatApiKey" placeholder="留空复用上方 API Key">
|
|
|
- </div>
|
|
|
- <div class="field">
|
|
|
- <label>API 地址</label>
|
|
|
- <input type="text" id="settingsChatApiBase" disabled placeholder="默认与生图 API 地址一致">
|
|
|
- </div>
|
|
|
- <div class="field">
|
|
|
- <label>对话模型</label>
|
|
|
- <select id="settingsChatModel">
|
|
|
- <option value="deepseek-v4.1-flash">deepseek-v4.1-flash</option>
|
|
|
- <option value="glm-5.3-flash">glm-5.3-flash</option>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- <div class="settings-links">
|
|
|
- <button type="button" class="settings-link settings-link-btn" id="btnTestChat">
|
|
|
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 12a8 8 0 1 1-2.3-5.6"/><path d="M20 4v5h-5"/></svg>
|
|
|
- <span>测试对话模型</span>
|
|
|
- </button>
|
|
|
- <span id="chatTestStatus" class="badge"></span>
|
|
|
</div>
|
|
|
+ <span class="panel-watermark"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="7.5" cy="15.5" r="4.5"/><path d="M11 12L21 2"/><path d="M16 7l3 3"/></svg></span>
|
|
|
+ <div class="panel-body">
|
|
|
+ <div id="settingsTabImage" class="settings-tab-body" role="tabpanel">
|
|
|
+ <div class="field">
|
|
|
+ <div class="field-label-row">
|
|
|
+ <label>API Key<span class="req">*</span></label>
|
|
|
+ <span class="label-links">
|
|
|
+ <a class="settings-link settings-link-compact" href="https://o-hubs.com/api/console/keys" target="_blank" rel="noopener noreferrer">
|
|
|
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="7.5" cy="15.5" r="4.5"/><path d="M11 12L21 2"/><path d="M16 7l3 3"/></svg>
|
|
|
+ <span>获取 API Key</span>
|
|
|
+ </a>
|
|
|
+ <a class="settings-link settings-link-compact" href="https://o-hubs.com/home" target="_blank" rel="noopener noreferrer">
|
|
|
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="6" width="18" height="13" rx="3"/><path d="M3 10h18"/><path d="M7 15h3"/></svg>
|
|
|
+ <span>充值</span>
|
|
|
+ </a>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <input type="text" id="settingsApiKey" placeholder="sk-...">
|
|
|
+ </div>
|
|
|
+ <div class="field">
|
|
|
+ <label>API 地址</label>
|
|
|
+ <input type="text" id="settingsApiBase" value="https://api.lk888.ai" disabled>
|
|
|
+ </div>
|
|
|
+ <div class="field">
|
|
|
+ <label>默认模型</label>
|
|
|
+ <select id="settingsModel"></select>
|
|
|
+ </div>
|
|
|
+ <div class="settings-links">
|
|
|
+ <button type="button" class="settings-link settings-link-btn" id="btnTestImage">
|
|
|
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 12a8 8 0 1 1-2.3-5.6"/><path d="M20 4v5h-5"/></svg>
|
|
|
+ <span>测试 API 与模型</span>
|
|
|
+ </button>
|
|
|
+ <span id="imageTestStatus" class="badge"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div id="settingsTabChat" class="settings-tab-body" role="tabpanel" hidden>
|
|
|
+ <div class="field">
|
|
|
+ <label>API Key</label>
|
|
|
+ <input type="text" id="settingsChatApiKey" placeholder="留空复用上方 API Key">
|
|
|
+ </div>
|
|
|
+ <div class="field">
|
|
|
+ <label>API 地址</label>
|
|
|
+ <input type="text" id="settingsChatApiBase" disabled placeholder="默认与生图 API 地址一致">
|
|
|
+ </div>
|
|
|
+ <div class="field">
|
|
|
+ <label>对话模型</label>
|
|
|
+ <select id="settingsChatModel">
|
|
|
+ <option value="deepseek-v4.1-flash">deepseek-v4.1-flash</option>
|
|
|
+ <option value="glm-5.3-flash">glm-5.3-flash</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="settings-links">
|
|
|
+ <button type="button" class="settings-link settings-link-btn" id="btnTestChat">
|
|
|
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 12a8 8 0 1 1-2.3-5.6"/><path d="M20 4v5h-5"/></svg>
|
|
|
+ <span>测试对话模型</span>
|
|
|
+ </button>
|
|
|
+ <span id="chatTestStatus" class="badge"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="panel-save-row">
|
|
|
+ <button class="btn btn-primary btn-small" id="btnSaveApi">保存设置</button>
|
|
|
+ <span id="apiSaveStatus" class="badge"></span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="panel panel-narrow">
|
|
|
- <div class="stage-marker"><span class="num">2</span><span>采集配置</span></div>
|
|
|
- <span class="panel-watermark"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z"/><path d="M3 11h18"/></svg></span>
|
|
|
- <div class="panel-body">
|
|
|
- <div class="field">
|
|
|
- <label>输出根目录</label>
|
|
|
- <input type="text" id="settingsRootDir" placeholder="/path/to/workspace">
|
|
|
- </div>
|
|
|
- <div class="field-row">
|
|
|
+
|
|
|
+ <div class="panel panel-narrow">
|
|
|
+ <div class="stage-marker"><span class="num">2</span><span>采集配置</span></div>
|
|
|
+ <span class="panel-watermark"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z"/><path d="M3 11h18"/></svg></span>
|
|
|
+ <div class="panel-body">
|
|
|
<div class="field">
|
|
|
- <label>每页条数</label>
|
|
|
- <input type="number" id="pageSizeInput" min="1" value="50">
|
|
|
+ <label>输出根目录</label>
|
|
|
+ <input type="text" id="settingsRootDir" placeholder="/path/to/workspace">
|
|
|
+ </div>
|
|
|
+ <div class="field-row">
|
|
|
+ <div class="field">
|
|
|
+ <label>每页条数</label>
|
|
|
+ <input type="number" id="pageSizeInput" min="1" value="50">
|
|
|
+ </div>
|
|
|
+ <div class="field">
|
|
|
+ <label>间隔 (ms)</label>
|
|
|
+ <input type="number" id="delayInput" min="0" value="300">
|
|
|
+ <div class="help">建议 ≥ 200</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="field">
|
|
|
- <label>间隔 (ms)</label>
|
|
|
- <input type="number" id="delayInput" min="0" value="300">
|
|
|
- <div class="help">建议 ≥ 200</div>
|
|
|
+ <label>Cookie(淘宝闪购)</label>
|
|
|
+ <textarea id="settingsCookie" rows="3" placeholder="登录 melody.shop.ele.me 后从 DevTools 复制"></textarea>
|
|
|
+ <div class="help">Cookie 保存后不再回显;会话过期时粘贴新值即可更新</div>
|
|
|
+ </div>
|
|
|
+ <div class="panel-save-row">
|
|
|
+ <button class="btn btn-primary btn-small" id="btnSaveCrawl">保存设置</button>
|
|
|
+ <span id="crawlSaveStatus" class="badge"></span>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="field">
|
|
|
- <label>Cookie(淘宝闪购)</label>
|
|
|
- <textarea id="settingsCookie" rows="3" placeholder="登录 melody.shop.ele.me 后从 DevTools 复制"></textarea>
|
|
|
- <div class="help">Cookie 保存后不再回显;会话过期时粘贴新值即可更新</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-<div class="panel panel-narrow">
|
|
|
- <div class="stage-marker"><span class="num">3</span><span>安全设置</span></div>
|
|
|
- <span class="panel-watermark"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3l7 3v5c0 4.4-3 8.4-7 10-4-1.6-7-5.6-7-10V6Z"/><path d="M9.5 12l1.8 1.8L15 10"/></svg></span>
|
|
|
- <div class="panel-body">
|
|
|
- <div class="field">
|
|
|
- <label>局域网访问口令(accessToken)</label>
|
|
|
- <input type="text" id="settingsAccessToken" placeholder="未设置" autocomplete="off">
|
|
|
- <div class="help">设置后,同一局域网的其他电脑访问本服务需要输入此口令(本机 127.0.0.1 不受影响)。留空保持不变;输入 - 清除口令。临时开关也可用环境变量 ACCESS_TOKEN。</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="panel panel-narrow">
|
|
|
- <div class="stage-marker"><span class="num">4</span><span>钉钉 AI 表格</span></div>
|
|
|
- <span class="panel-watermark"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4" width="18" height="16" rx="3"/><path d="M3 10h18M9 10v10"/></svg></span>
|
|
|
- <div class="panel-body">
|
|
|
- <div class="field">
|
|
|
- <label style="display:flex;align-items:center;gap:6px;">
|
|
|
- <input type="checkbox" id="settingsAitableEnabled">
|
|
|
- <span>启用(同步完成后自动推送增量到云端)</span>
|
|
|
- </label>
|
|
|
- </div>
|
|
|
- <div class="field">
|
|
|
- <label>AppKey / AppSecret(钉钉企业内部应用)</label>
|
|
|
- <input type="text" id="settingsAitableAppKey" placeholder="钉钉开放平台应用的 AppKey" autocomplete="off">
|
|
|
- <input type="text" id="settingsAitableAppSecret" placeholder="AppSecret 未设置" autocomplete="off" style="margin-top:6px;">
|
|
|
- <div class="help">Secret 保存后不回显;输入 - 清除。应用需开通「AI 表格」API 权限。</div>
|
|
|
- </div>
|
|
|
- <div class="field">
|
|
|
- <label>Base ID / 数据表名称</label>
|
|
|
- <input type="text" id="settingsAitableBaseId" placeholder="粘贴 AI 表格分享链接或直接填 Base ID" autocomplete="off">
|
|
|
- <input type="text" id="settingsAitableSheetName" placeholder="经营数据" autocomplete="off" style="margin-top:6px;">
|
|
|
- <div class="help">Base ID 可直接粘贴分享链接(形如 alidocs.dingtalk.com/i/nodes/xxx),保存时自动提取 ID;网页版打开表格时地址栏里也能看到。</div>
|
|
|
+
|
|
|
+ <div class="settings-col">
|
|
|
+ <div class="panel panel-narrow">
|
|
|
+ <div class="stage-marker"><span class="num">3</span><span>安全设置</span></div>
|
|
|
+ <span class="panel-watermark"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3l7 3v5c0 4.4-3 8.4-7 10-4-1.6-7-5.6-7-10V6Z"/><path d="M9.5 12l1.8 1.8L15 10"/></svg></span>
|
|
|
+ <div class="panel-body">
|
|
|
+ <div class="field">
|
|
|
+ <label>局域网访问口令(accessToken)</label>
|
|
|
+ <input type="text" id="settingsAccessToken" placeholder="未设置" autocomplete="off">
|
|
|
+ <div class="help">设置后,同一局域网的其他电脑访问本服务需要输入此口令(本机 127.0.0.1 不受影响)。留空保持不变;输入 - 清除口令。临时开关也可用环境变量 ACCESS_TOKEN。</div>
|
|
|
+ </div>
|
|
|
+ <div class="panel-save-row">
|
|
|
+ <button class="btn btn-primary btn-small" id="btnSaveSecurity">保存设置</button>
|
|
|
+ <span id="securitySaveStatus" class="badge"></span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="settings-links">
|
|
|
- <button type="button" class="settings-link settings-link-btn" id="btnTestAitable"><span>测试连通</span></button>
|
|
|
- <button type="button" class="settings-link settings-link-btn" id="btnAitablePush"><span>推送云端</span></button>
|
|
|
- <button type="button" class="settings-link settings-link-btn" id="btnAitablePull"><span>从云端拉取</span></button>
|
|
|
- <span id="aitableStatus" class="badge"></span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="panel panel-narrow">
|
|
|
+ <div class="stage-marker"><span class="num">4</span><span>钉钉 AI 表格</span></div>
|
|
|
+ <span class="panel-watermark"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4" width="18" height="16" rx="3"/><path d="M3 10h18M9 10v10"/></svg></span>
|
|
|
+ <div class="panel-body">
|
|
|
+ <div class="field">
|
|
|
+ <label style="display:flex;align-items:center;gap:6px;">
|
|
|
+ <input type="checkbox" id="settingsAitableEnabled">
|
|
|
+ <span>启用(同步完成后自动推送增量到云端)</span>
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ <div class="field">
|
|
|
+ <label>AppKey / AppSecret(钉钉企业内部应用)</label>
|
|
|
+ <input type="text" id="settingsAitableAppKey" placeholder="钉钉开放平台应用的 AppKey" autocomplete="off">
|
|
|
+ <input type="text" id="settingsAitableAppSecret" placeholder="AppSecret 未设置" autocomplete="off" style="margin-top:6px;">
|
|
|
+ <div class="help">Secret 保存后不回显;输入 - 清除。应用需开通「AI 表格」API 权限。</div>
|
|
|
+ </div>
|
|
|
+ <div class="field">
|
|
|
+ <label>Base ID / 数据表名称</label>
|
|
|
+ <input type="text" id="settingsAitableBaseId" placeholder="粘贴 AI 表格分享链接或直接填 Base ID" autocomplete="off">
|
|
|
+ <input type="text" id="settingsAitableSheetName" placeholder="经营数据" autocomplete="off" style="margin-top:6px;">
|
|
|
+ <div class="help">Base ID 可直接粘贴分享链接(形如 alidocs.dingtalk.com/i/nodes/xxx),保存时自动提取 ID;网页版打开表格时地址栏里也能看到。</div>
|
|
|
+ </div>
|
|
|
+ <div class="settings-links">
|
|
|
+ <button type="button" class="settings-link settings-link-btn" id="btnTestAitable"><span>测试连通</span></button>
|
|
|
+ <button type="button" class="settings-link settings-link-btn" id="btnAitablePush"><span>推送云端</span></button>
|
|
|
+ <button type="button" class="settings-link settings-link-btn" id="btnAitablePull"><span>从云端拉取</span></button>
|
|
|
+ <span id="aitableStatus" class="badge"></span>
|
|
|
+ </div>
|
|
|
+ <div class="help">架构:取数机「同步 → 自动推送」,其他电脑「从云端拉取」到本地后再看报表/图表。云表为在线主档案,一人取数、多人共享。</div>
|
|
|
+ <div class="panel-save-row">
|
|
|
+ <button class="btn btn-primary btn-small" id="btnSaveAitable">保存设置</button>
|
|
|
+ <span id="aitableSaveStatus" class="badge"></span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="help">架构:取数机「同步 → 自动推送」,其他电脑「从云端拉取」到本地后再看报表/图表。云表为在线主档案,一人取数、多人共享。</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</main>
|
|
|
</div>
|
|
|
|
|
|
- <!-- ==================== 系统日志 ==================== -->
|
|
|
+ <!-- ==================== 系统日志 ==================== --> <!-- ==================== 系统日志 ==================== -->
|
|
|
<div id="viewLogs" class="view">
|
|
|
<main class="content">
|
|
|
<div class="page-header">
|