fix(pdd-extension): 增强 MMS Cookie 多维嗅探与 PASS_ID 校验,新增插件运行日志与升级 v1.1.0
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
}
|
||||
body {
|
||||
width: 360px;
|
||||
padding: 16px;
|
||||
width: 380px;
|
||||
padding: 14px;
|
||||
background: #f8fafc;
|
||||
color: #1e293b;
|
||||
font-size: 13px;
|
||||
@@ -22,9 +22,9 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 12px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #e2e8f0;
|
||||
margin-bottom: 14px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.title {
|
||||
font-size: 15px;
|
||||
@@ -34,6 +34,14 @@
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
.version-tag {
|
||||
font-size: 10px;
|
||||
font-weight: normal;
|
||||
background: #e0e7ff;
|
||||
color: #3730a3;
|
||||
padding: 1px 6px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.badge {
|
||||
display: inline-block;
|
||||
padding: 2px 8px;
|
||||
@@ -43,43 +51,50 @@
|
||||
}
|
||||
.badge-ok { background: #dcfce7; color: #15803d; }
|
||||
.badge-err { background: #fee2e2; color: #b91c1c; }
|
||||
.badge-warn { background: #fef3c7; color: #b45309; }
|
||||
.badge-gray { background: #f1f5f9; color: #64748b; }
|
||||
.card {
|
||||
background: #ffffff;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
margin-bottom: 12px;
|
||||
padding: 11px;
|
||||
margin-bottom: 10px;
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.03);
|
||||
}
|
||||
.row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 8px;
|
||||
align-items: center;
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
.row:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.label {
|
||||
color: #64748b;
|
||||
font-size: 12px;
|
||||
}
|
||||
.val {
|
||||
font-weight: 500;
|
||||
color: #0f172a;
|
||||
font-size: 12px;
|
||||
}
|
||||
.val-highlight {
|
||||
color: #2563eb;
|
||||
}
|
||||
.form-group {
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: 9px;
|
||||
}
|
||||
.form-group label {
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
margin-bottom: 3px;
|
||||
font-weight: 500;
|
||||
font-size: 12px;
|
||||
color: #334155;
|
||||
}
|
||||
input, textarea {
|
||||
width: 100%;
|
||||
padding: 7px 10px;
|
||||
padding: 6px 9px;
|
||||
border: 1px solid #cbd5e1;
|
||||
border-radius: 6px;
|
||||
font-size: 12px;
|
||||
@@ -93,7 +108,7 @@
|
||||
.btn {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
padding: 8px 14px;
|
||||
padding: 8px 12px;
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
@@ -113,19 +128,100 @@
|
||||
background: #ffffff;
|
||||
border: 1px solid #cbd5e1;
|
||||
color: #334155;
|
||||
margin-top: 6px;
|
||||
}
|
||||
.btn-secondary:hover {
|
||||
background: #f8fafc;
|
||||
border-color: #94a3b8;
|
||||
}
|
||||
.btn-xs {
|
||||
width: auto;
|
||||
padding: 2px 7px;
|
||||
font-size: 11px;
|
||||
border-radius: 4px;
|
||||
background: #f1f5f9;
|
||||
border: 1px solid #cbd5e1;
|
||||
color: #475569;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn-xs:hover {
|
||||
background: #e2e8f0;
|
||||
color: #1e293b;
|
||||
}
|
||||
.btn:disabled {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.msg-box {
|
||||
font-size: 12px;
|
||||
padding: 8px 10px;
|
||||
border-radius: 6px;
|
||||
margin-top: 8px;
|
||||
display: none;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.msg-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
|
||||
.msg-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
|
||||
.msg-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
|
||||
|
||||
/* 日志控制台样式 */
|
||||
.log-panel {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.log-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.log-title {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #475569;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
.log-actions {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
}
|
||||
.log-box {
|
||||
background: #0f172a;
|
||||
color: #e2e8f0;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||||
font-size: 11px;
|
||||
border-radius: 6px;
|
||||
padding: 8px;
|
||||
max-height: 150px;
|
||||
overflow-y: auto;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.log-item {
|
||||
padding: 2px 0;
|
||||
border-bottom: 1px dashed #1e293b;
|
||||
word-break: break-all;
|
||||
}
|
||||
.log-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.log-time {
|
||||
color: #64748b;
|
||||
margin-right: 4px;
|
||||
}
|
||||
.log-tag-info { color: #38bdf8; font-weight: 600; margin-right: 4px; }
|
||||
.log-tag-success { color: #4ade80; font-weight: 600; margin-right: 4px; }
|
||||
.log-tag-warn { color: #facc15; font-weight: 600; margin-right: 4px; }
|
||||
.log-tag-error { color: #f87171; font-weight: 600; margin-right: 4px; }
|
||||
.log-action { color: #a78bfa; margin-right: 4px; }
|
||||
.log-empty {
|
||||
color: #64748b;
|
||||
text-align: center;
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
.security-tag {
|
||||
font-size: 11px;
|
||||
color: #64748b;
|
||||
color: #94a3b8;
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
@@ -133,21 +229,13 @@
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.msg-box {
|
||||
font-size: 11px;
|
||||
padding: 6px 10px;
|
||||
border-radius: 4px;
|
||||
margin-top: 8px;
|
||||
display: none;
|
||||
}
|
||||
.msg-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
|
||||
.msg-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<div class="title">
|
||||
<span>拼多多 Cookie 保活</span>
|
||||
<span class="version-tag">v1.1.0</span>
|
||||
</div>
|
||||
<div id="statusBadge" class="badge badge-gray">未检测</div>
|
||||
</div>
|
||||
@@ -168,7 +256,7 @@
|
||||
</div>
|
||||
<div class="row" id="orderCountRow" style="display: none;">
|
||||
<span class="label">在售/历史单:</span>
|
||||
<span id="orderCountDisplay" class="val" style="color: #2563eb;">0 笔</span>
|
||||
<span id="orderCountDisplay" class="val val-highlight">0 笔</span>
|
||||
</div>
|
||||
<div id="statusMsg" class="msg-box"></div>
|
||||
</div>
|
||||
@@ -176,17 +264,34 @@
|
||||
<!-- 手动立即同步按钮 -->
|
||||
<button id="btnSyncNow" class="btn btn-primary">立即上传同步 Cookie</button>
|
||||
|
||||
<!-- 运行与诊断日志面板 -->
|
||||
<div class="log-panel">
|
||||
<div class="log-header">
|
||||
<div class="log-title">
|
||||
<span>📋 运行日志</span>
|
||||
<span id="logCountBadge" style="font-size: 10px; color: #64748b;">(0条)</span>
|
||||
</div>
|
||||
<div class="log-actions">
|
||||
<button id="btnCopyLogs" class="btn-xs" title="复制全部日志到剪贴板">复制日志</button>
|
||||
<button id="btnClearLogs" class="btn-xs" title="清空历史日志">清空</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="logBox" class="log-box">
|
||||
<div class="log-empty">暂无运行日志</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 配置折叠区 -->
|
||||
<div style="margin-top: 12px;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;">
|
||||
<span style="font-weight: 600; font-size: 12px; color: #475569;">连接配置</span>
|
||||
<a href="#" id="btnToggleImport" style="font-size: 11px; color: #2563eb; text-decoration: none;">一键导入配置 JSON</a>
|
||||
<span style="font-weight: 600; font-size: 12px; color: #475569;">⚙️ 连接配置</span>
|
||||
<a href="#" id="btnToggleImport" style="font-size: 11px; color: #2563eb; text-decoration: none;">导入配置 JSON</a>
|
||||
</div>
|
||||
|
||||
<!-- 导入 JSON 框(默认隐藏) -->
|
||||
<div id="importArea" style="display: none; margin-bottom: 10px;">
|
||||
<textarea id="importJsonInput" rows="3" placeholder="在此粘贴后台复制的完整配置 JSON..."></textarea>
|
||||
<button id="btnApplyImport" class="btn btn-secondary" style="margin-top: 4px; padding: 5px;">解析并填充</button>
|
||||
<button id="btnApplyImport" class="btn btn-secondary" style="margin-top: 4px; padding: 5px; font-size: 11px;">解析并填充输入框</button>
|
||||
</div>
|
||||
|
||||
<div class="card" style="margin-bottom: 8px;">
|
||||
@@ -198,10 +303,17 @@
|
||||
<label for="inputShopId">店铺标识 (Shop ID)</label>
|
||||
<input type="text" id="inputShopId" placeholder="例如:store_pdd_01">
|
||||
</div>
|
||||
<div class="form-group" style="margin-bottom: 0;">
|
||||
<div class="form-group">
|
||||
<label for="inputSyncToken">专属配对密钥 (Sync Token)</label>
|
||||
<input type="password" id="inputSyncToken" placeholder="例如:pdd_tok_xxx">
|
||||
</div>
|
||||
<div class="form-group" style="margin-bottom: 0;">
|
||||
<label for="inputManualCookie" style="display: flex; justify-content: space-between;">
|
||||
<span>手动指定 Cookie (选填)</span>
|
||||
<span style="color: #94a3b8; font-weight: normal; font-size: 10px;">留空则自动提取</span>
|
||||
</label>
|
||||
<textarea id="inputManualCookie" rows="2" placeholder="默认自动嗅探浏览器 Cookie;若需要强制覆盖可在此手动粘贴完整 Cookie"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button id="btnSaveConfig" class="btn btn-secondary">保存配置并重连</button>
|
||||
|
||||
Reference in New Issue
Block a user