diff --git a/README.md b/README.md index c3cf454..224aff8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ > 一键搜索 · 自动点击 · 智能评论 —— 小红书运营引流的效率神器 -[![版本](https://img.shields.io/badge/版本-1.8.3-ff2442.svg)](https://dl.88531.cn/xhs.html) +[![版本](https://img.shields.io/badge/版本-1.8.4-ff2442.svg)](https://dl.88531.cn/xhs.html) [![平台](https://img.shields.io/badge/平台-Chrome%20%7C%20Edge-4caf50.svg)](#安装方法) [![语言](https://img.shields.io/badge/语言-纯%20JavaScript-2196f3.svg)](#开发说明) @@ -104,10 +104,14 @@ ## 📜 版本历史 -当前版本:**1.8.3** +当前版本:**1.8.4**
-展开查看完整变更记录(v1.2.0 ~ v1.8.3) +展开查看完整变更记录(v1.2.0 ~ v1.8.4) + +### 1.8.4 +- **支付成功页直接显示卡密**:只要服务端发了卡就把卡密明文展示在购买页(等宽大字 + 一键复制),**自动激活失败也照常显示**,并附手动激活指引(侧边栏「输入卡密」粘贴 → 激活)——付了钱拿不到卡密、只能找客服的情况不会再出现 +- 打包结构修正:manifest.json 直接位于压缩包根目录,解压后选中同名文件夹即可加载(此前需进内层文件夹,Windows 用户按直觉选外层会报「清单文件缺失或不可读取」) ### 1.8.3 - **评论去重:评过的笔记不再重复评论**。每次成功评论后把笔记 ID 写入「已评论索引」(本机保存,最多 5000 条),之后任何时候再刷到同一篇(同关键词、不同关键词、换个时间重新跑都一样)都会**自动跳过**,不会给同一篇笔记发第二条评论——避免重复评论触发平台风控限流 diff --git a/background.js b/background.js index 71c956b..3b80825 100644 --- a/background.js +++ b/background.js @@ -16,7 +16,7 @@ const DEFAULT_AI = { const AUTH_BASE = 'https://auth.88531.cn'; const AUTH_PROJECT_ID = 3; const AUTH_API_KEY = 'ak_bbf83b76df8219388d7f60b9e67c7db2'; -const CLIENT_VERSION = '1.8.3'; +const CLIENT_VERSION = '1.8.4'; const TRIAL_MS = 72 * 60 * 60 * 1000; // 试用 72 小时(3 天) const TRIAL_QUOTA = 100; // 试用期最多 100 条评论(时间/条数先到先停,防止白嫖薅量) const GRACE_DAILY = 3; // 试用到期不硬锁:每天保留 3 条体验额度 diff --git a/buy.css b/buy.css index b367ef6..564ed92 100644 --- a/buy.css +++ b/buy.css @@ -254,3 +254,67 @@ h2 { color: #ff2442; text-decoration: none; } + +/* 支付成功卡密展示区:无论自动激活成功与否都显示,用户可随时复制 */ +.card-box { + margin-top: 14px; + border: 2px dashed #ff2442; + border-radius: 8px; + padding: 14px; + background: #fff5f6; +} + +.card-label { + font-size: 13px; + color: #666; + margin-bottom: 8px; +} + +.card-row { + display: flex; + align-items: center; + gap: 10px; + flex-wrap: wrap; +} + +.card-key { + flex: 1; + min-width: 240px; + font-family: Consolas, 'Courier New', monospace; + font-size: 16px; + font-weight: 700; + color: #1a1a1a; + background: #fff; + border: 1px solid #f0c0c6; + border-radius: 6px; + padding: 10px 12px; + user-select: all; + word-break: break-all; +} + +.copy-btn { + padding: 10px 18px; + border: none; + border-radius: 6px; + background: #ff2442; + color: #fff; + font-size: 14px; + font-weight: 600; + cursor: pointer; + white-space: nowrap; +} + +.copy-btn:hover { + background: #e01f3a; +} + +.card-hint { + margin-top: 8px; + font-size: 12px; + color: #999; +} + +.ok-line.warn { + color: #c62828; + font-weight: 600; +} diff --git a/buy.html b/buy.html index 0c493f2..b064192 100644 --- a/buy.html +++ b/buy.html @@ -33,6 +33,14 @@ diff --git a/buy.js b/buy.js index d828d63..a4de940 100644 --- a/buy.js +++ b/buy.js @@ -102,16 +102,11 @@ function startPolling() { try { const res = await chrome.runtime.sendMessage({ action: 'authQueryOrder', orderNo }); if (!res || !res.ok) return; - if (res.activated) { + if (res.cardKey) { + // 只要服务端已发卡就把卡密显示出来——哪怕自动激活失败,用户也能自己复制激活 clearInterval(pollTimer); pollTimer = null; - showActivated(res); - } else if (res.cardKey && !res.activated) { - clearInterval(pollTimer); - pollTimer = null; - const status = $('order-status'); - status.className = 'order-status error'; - status.textContent = '✗ 已支付但激活失败:' + ((res.licenseState && res.licenseState.message) || '请把订单号发给客服手动处理'); + showCard(res); } else { const status = $('order-status'); status.className = 'order-status pending'; @@ -123,16 +118,51 @@ function startPolling() { }, 5000); } -function showActivated(res) { +// 支付成功:显示卡密(激活成功/失败都显示,激活失败时给出手动激活指引) +function showCard(res) { const status = $('order-status'); - status.className = 'order-status success'; - status.innerHTML = ` -
✓ 支付成功,已自动激活
-
卡密:${esc(res.cardKey || '')}
-
到期时间:${esc(res.expireTime || '永久')}
-
回到插件侧边栏即可使用全部功能(本机已授权)。
`; + const ok = !!res.activated; + status.className = 'order-status ' + (ok ? 'success' : 'error'); + status.innerHTML = ok + ? `
✓ 支付成功,已自动激活本机
+
到期时间:${esc(res.expireTime || '永久')}
+
回到插件侧边栏即可使用全部功能。
` + : `
✓ 支付成功
+
自动激活未生效${(res.licenseState && res.licenseState.message) ? ':' + esc(res.licenseState.message) : ''}
+
请复制下面的卡密,回到插件侧边栏「输入卡密」框粘贴 → 点「激活」即可。
`; + + $('card-key').textContent = res.cardKey || ''; + $('card-hint').textContent = ok + ? '卡密已随本机自动激活,无需手动输入;保存好可换机或重装后使用。' + : '本页不会关闭也不会失效,卡密就在这里,随时可以复制。'; + $('card-box').hidden = false; + $('card-box').scrollIntoView({ behavior: 'smooth', block: 'center' }); } +// 复制卡密(剪贴板 API 失败时降级 execCommand) +$('copy-card').addEventListener('click', async () => { + const key = ($('card-key').textContent || '').trim(); + if (!key) return; + let ok = false; + try { + await navigator.clipboard.writeText(key); + ok = true; + } catch (e) { /* 降级 */ } + if (!ok) { + try { + const ta = document.createElement('textarea'); + ta.value = key; + ta.style.cssText = 'position:fixed;left:-9999px'; + document.body.appendChild(ta); + ta.select(); + ok = document.execCommand('copy'); + ta.remove(); + } catch (e) { ok = false; } + } + $('copy-card').textContent = ok ? '✓ 已复制' : '复制失败,请手动选中卡密复制'; + setTimeout(() => { $('copy-card').textContent = '复制卡密'; }, 2500); +}); + document.querySelectorAll('.pay-btn').forEach((btn) => { btn.addEventListener('click', () => createOrder(btn.dataset.pay)); }); diff --git a/manifest.json b/manifest.json index 25ab1c0..a904c58 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "小红书自动评论助手", - "version": "1.8.3", + "version": "1.8.4", "description": "右侧侧边栏常驻的自动评论助手,支持试用/卡密授权、固定池/自定义文字/图片/AI评论", "permissions": [ "storage", diff --git a/privacy.html b/privacy.html index 13150ec..bd4e141 100644 --- a/privacy.html +++ b/privacy.html @@ -16,7 +16,7 @@

小红书自动评论助手 · 隐私政策

-
生效日期:2026年10月10日 · 适用版本:v1.8.3 及以上
+
生效日期:2026年10月10日 · 适用版本:v1.8.4 及以上

感谢使用「小红书自动评论助手」浏览器扩展(以下简称"本插件")。我们重视你的隐私。本页面说明本插件收集哪些信息、如何使用以及如何保护。

diff --git a/sidepanel.html b/sidepanel.html index d971235..d1f10f1 100644 --- a/sidepanel.html +++ b/sidepanel.html @@ -204,7 +204,7 @@