diff --git a/CHROMEWEBSTORE.md b/CHROMEWEBSTORE.md
new file mode 100644
index 0000000..c8868e3
--- /dev/null
+++ b/CHROMEWEBSTORE.md
@@ -0,0 +1,87 @@
+# Chrome Web Store 上架申报与资料说明
+
+> 适用版本:V9.3.0
+> 打包文件:`release/sansheng-product-analysis-extension-v9.3.0-webstore.zip`
+> 开发者平台:[Chrome 网上应用店信息中心 (Developer Dashboard)](https://chrome.google.com/webstore/devconsole/)
+
+---
+
+## 1. 商店基本信息 (Store Listing)
+
+### 扩展名称 (Name)
+```text
+三笙 · 电商商品分析闭环
+```
+
+### 简短摘要 (Summary, 最多 132 字符)
+```text
+跨类目电商商品智能分析:支持动态参数与SKU采集、主图详情图文分源、真实评价归纳,生成专业开品与AI视觉分析报告。
+```
+
+### 详细描述 (Detailed Description)
+```text
+「三笙 · 电商商品分析闭环」是一款面向电商运营、商品策划、设计师及商业决策者的专业商品洞察与开品辅助扩展。
+
+【核心功能】
+1. 详情深度解析:自动识别并结构化提取商品参数、SKU规格、主图、详情图、真实买家评价与问大家内容。
+2. 图文分源分析:对主图视觉信号、详情承接证据进行逐层拆解,避免图片裁切与失真。
+3. 真实口碑洞察:聚合多轮买家评价,提炼好评卖点、负评痛点及高频反馈,帮助定位产品改良空间。
+4. 七角色智能报告:联动三笙云端大模型,从商品策略、电商转化、消费者洞察、产品供应链、视觉设计、商业决策等维度输出闭环开品建议。
+
+【使用说明】
+1. 在 Chrome 中打开淘宝(taobao.com)或天猫(tmall.com)的商品详情页面。
+2. 点击浏览器右上角插件图标,选择需要分析的评价样本量。
+3. 点击“开始采集”,完成后即可一键跳转查看完整的结构化开品分析报告。
+
+【数据安全与隐私】
+本扩展仅在用户明确点击操作时分析当前浏览的商品公开信息,绝不收集用户个人隐私账户信息或浏览历史。
+```
+
+### 类别 (Category)
+- **生产力工具 (Productivity)** 或 **购物与分析 (Shopping / Business)**
+
+### 默认语言 (Default Language)
+- **中文(简体) (Chinese Simplified)**
+
+---
+
+## 2. 权限使用理由申诉 (Permissions Justifications)
+
+在提交审核时,Google 审核人员会要求逐项填写权限的必要性理由,请直接复制以下内容:
+
+| 权限 / 域名 | 审核用途说明(中文/英文) |
+| :--- | :--- |
+| **`tabs`** | 用于检测当前激活标签页是否属于支持的电商商品页面(淘宝/天猫),并在分析任务完成后打开报告页面展示结果。
*(Used to detect if the active tab is an e-commerce product page and open the generated report in a new tab upon completion.)* |
+| **`scripting`** | 用于在用户主动点击采集时,向商品页安全注入提取脚本,读取商品公开的规格参数及评论结构。
*(Used to inject content scripts to extract public product specifications and customer reviews when triggered by user.)* |
+| **`storage`** | 用于在本地临时保存采集状态、进度以及身份授权凭证,保证用户刷新或切换标签时不丢失进度。
*(Used to store temporary collection progress, state, and authentication tokens locally.)* |
+| **`alarms`** | 用于在长任务采集期间保持服务状态心跳,避免浏览器后台 Service Worker 意外失活导致任务中断。
*(Used to maintain scheduled background heartbeats to prevent service worker idling during long collection tasks.)* |
+| **`notifications`** | 用于在云端七角色分析报告生成完成时,向用户发送桌面完成提醒。
*(Used to notify the user when the AI product analysis report is ready.)* |
+| **`https://*.tmall.com/*` / `https://*.taobao.com/*`** | 核心业务目标域名,用于合法读取用户当前正在浏览的目标商品公开详情与评价。
*(Host permissions required to parse public product details and user reviews on Tmall/Taobao.)* |
+| **`https://*.alicdn.com/*`** | 用于获取商品原图的高清资源链接与缩略图预览。
*(Required to fetch high-resolution product image assets hosted on Alibaba CDN.)* |
+| **`https://api.sanshengai.net/*` / `https://www.sanshengai.net/*`** | 三笙官方生产服务端接口,用于传输清洗后的商品脱敏数据并接收云端大模型开品分析结果。
*(Official backend API endpoints to submit analysis payloads and retrieve report data securely via HTTPS.)* |
+
+---
+
+## 3. 单一用途说明 (Single Purpose)
+```text
+本扩展的单一用途是为电商从业者在浏览淘宝/天猫商品详情页时,提供商品公开信息结构化分析与云端 AI 开品辅助决策。
+```
+
+---
+
+## 4. 隐私权政策 (Privacy Policy)
+
+- **隐私政策声明网址**:`https://www.sanshengai.net/privacy`(请确保公司官网该页面可访问)
+- **数据使用申明**:
+ - [x] 不出售任何用户数据
+ - [x] 不用于非关联目的或信用评估
+ - [x] 仅用于支持本扩展的核心商品分析功能
+
+---
+
+## 5. 准备材料清单
+
+- [x] **扩展 ZIP 压缩包**:`release/sansheng-product-analysis-extension-v9.3.0-webstore.zip`(已打包完成)
+- [x] **应用图标**:16x16, 48x48, 128x128(已全部内置于 ZIP)
+- [ ] **商店宣传截图 (Screenshots)**:准备 1~5 张 1280×800 或 640×400 的商品页操作与报告截图。
+- [ ] **小型宣传图 (Small Promo Tile)**:440×280 像素 PNG(可选)。
diff --git a/VERSION.txt b/VERSION.txt
index b13d146..3eefcb9 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-9.3.0
+1.0.0
diff --git a/extension/auth.js b/extension/auth.js
index 3aba912..5287ab4 100644
--- a/extension/auth.js
+++ b/extension/auth.js
@@ -1,5 +1,5 @@
// 切换环境后,在浏览器扩展管理页重新加载扩展并重新登录。
-const SANSHENG_ENV='dev'; // dev | test | prod
+const SANSHENG_ENV='test'; // dev | test | prod
const SANSHENG_ENVIRONMENTS={
dev:{apiBase:'http://localhost:19174',pcBase:'http://localhost:5173'},
test:{apiBase:'https://qa-api.sanshengai.net',pcBase:'https://qa.sanshengai.net'},
diff --git a/extension/background.js b/extension/background.js
index 1c57c97..a9c676a 100644
--- a/extension/background.js
+++ b/extension/background.js
@@ -317,7 +317,7 @@ async function run(tabId,manual,collectionMode='standard'){
await chrome.scripting.executeScript({target:{tabId},world:'MAIN',func:()=>{window.__TMALL_AI_STOP_REVIEW__=false;window.__TMALL_AI_REVIEW_PROGRESS__={count:0,round:0,stagnant:0,mode:'启动',elapsedMs:0,preview:[]};}});
let collectorDone=false,collectorError=null;const startedAt=Date.now();
const collectorPromise=chrome.scripting.executeScript({target:{tabId},world:'MAIN',func:collector,args:[manual,collectionMode]}).then(v=>v).catch(e=>{collectorError=e;return null}).finally(()=>{collectorDone=true});
- while(!collectorDone){try{const rr=await chrome.scripting.executeScript({target:{tabId},world:'MAIN',func:()=>window.__TMALL_AI_REVIEW_PROGRESS__||null});const live=rr?.[0]?.result;if(live)await setStatus(tabId,{state:'collecting_reviews',message:`评论采集中:${live.count||0} 条 · ${live.mode||'处理中'}${live.stagnant?` · ${live.stagnant}轮无新增`:''}`,progress:Math.min(67,18+(Number(live.round||0)*2)),reviewLive:{...live,elapsedMs:Date.now()-startedAt}})}catch(e){}await sleep(600)}
+ while(!collectorDone){try{const rr=await chrome.scripting.executeScript({target:{tabId},world:'MAIN',func:()=>window.__TMALL_AI_REVIEW_PROGRESS__||null});const live=rr?.[0]?.result;if(live){const target=live.reviewCap||(collectionMode==='quick'?50:collectionMode==='full'?200:100);const reviewRatio=Math.min(1,(live.count||0)/target);const displayProg=live.progress||Math.min(75,Math.round(20+reviewRatio*55));await setStatus(tabId,{state:'collecting_reviews',message:`评论采集中:${live.count||0} / ${target} 条 (${Math.round(reviewRatio*100)}%) · ${live.mode||'处理中'}${live.stagnant?` · ${live.stagnant}轮无新增`:''}`,progress:displayProg,reviewLive:{...live,elapsedMs:Date.now()-startedAt,reviewCap:target}})}}catch(e){}await sleep(500)}
const collectorResult=await collectorPromise;
if(collectorError)throw new Error('页面采集脚本执行失败:'+String(collectorError?.message||collectorError));
const raw=collectorResult?.[0]?.result;
@@ -376,12 +376,74 @@ async function collector(manual=false,collectionMode='standard'){
const bodyText=clean(bodyClone?.innerText||document.body?.innerText||'');
const captured=[];
const reviews=[]; const questions=[];
- const reviewCap=collectionMode==='quick'?300:(collectionMode==='full'?1500:800);
+ const reviewCap=collectionMode==='quick'?50:(collectionMode==='full'?200:100);
const reviewNetMeta={totals:[],hasMoreFalse:false,lastPageFlags:[],pageHints:[],networkReviewObjects:0,networkResponses:0};
const reviewStartedAt=Date.now();
const processedCaptureKeys=new Set();
+ function ensureInPageHud(){
+ let hud=document.getElementById('__sansheng_hud__');
+ if(!hud){
+ hud=document.createElement('div');
+ hud.id='__sansheng_hud__';
+ hud.innerHTML=`
+
+准备开始采集...0%
+
+有效评价0 / ${reviewCap}
翻页轮次第 0 轮
已用耗时0s
+等待读取商品评价...
`;
+ document.body.appendChild(hud);
+ document.getElementById('__ss_stop__')?.addEventListener('click',()=>{window.__TMALL_AI_STOP_REVIEW__=true;const b=document.getElementById('__ss_stop__');if(b)b.textContent='终止中…'});
+ }
+ return hud;
+ }
+ function updateInPageHud(data){
+ try{
+ ensureInPageHud();
+ const count=data.count||0;const cap=reviewCap;const pct=Math.min(100,Math.max(0,data.progress!=null?data.progress:Math.round((count/cap)*100)));
+ const bar=document.getElementById('__ss_bar__');if(bar)bar.style.width=pct+'%';
+ const pctEl=document.getElementById('__ss_pct__');if(pctEl)pctEl.textContent=pct+'%';
+ const labelEl=document.getElementById('__ss_step_label__');if(labelEl)labelEl.textContent=data.message||`评论采集中 (${count}/${cap}条)`;
+ const statReviews=document.getElementById('__ss_stat_reviews__');if(statReviews)statReviews.textContent=`${count} / ${cap}`;
+ const statRounds=document.getElementById('__ss_stat_rounds__');if(statRounds)statRounds.textContent=`第 ${data.round||0} 轮`;
+ const statTime=document.getElementById('__ss_stat_time__');if(statTime)statTime.textContent=Math.round((data.elapsedMs||0)/1000)+'s';
+ const previewBox=document.getElementById('__ss_preview_box__');if(previewBox&&data.preview&&data.preview.length)previewBox.textContent='最新:'+data.preview[0];
+ }catch(e){}
+ }
+ function finishInPageHud(success=true,message=''){
+ try{
+ const hud=document.getElementById('__sansheng_hud__');
+ if(hud){
+ const pulse=document.getElementById('__ss_pulse__');if(pulse){pulse.style.background=success?'#00a98f':'#ff7875';pulse.style.animation='none'}
+ const label=document.getElementById('__ss_step_label__');if(label)label.textContent=message||(success?`✓ 采集完成(共 ${reviews.length} 条评论),正在提交...`:'采集已终止');
+ const bar=document.getElementById('__ss_bar__');if(bar&&success)bar.style.width='100%';
+ const pct=document.getElementById('__ss_pct__');if(pct&&success)pct.textContent='100%';
+ setTimeout(()=>{if(hud&&hud.parentNode){hud.style.opacity='0';hud.style.transform='translateY(-12px)';setTimeout(()=>{if(hud.parentNode)hud.remove()},400)}},3500);
+ }
+ }catch(e){}
+ }
function dedupReviewCount(){const m=new Set();for(const r of reviews){const k=clean(r.content||'').replace(/\s+/g,'').slice(0,320);if(k)m.add(k)}return m.size}
- function publishReviewProgress(round=0,stagnant=0,mode='DOM',extra={}){const seen=new Set(),preview=[];for(let i=reviews.length-1;i>=0&&preview.length<3;i--){const c=clean(reviews[i]?.content||'');const k=c.replace(/\s+/g,'').slice(0,320);if(k&&!seen.has(k)){seen.add(k);preview.push(c.slice(0,70)+(c.length>70?'…':''))}}window.__TMALL_AI_REVIEW_PROGRESS__={
+ function publishReviewProgress(round=0,stagnant=0,mode='DOM',extra={}){
+ const seen=new Set(),preview=[];for(let i=reviews.length-1;i>=0&&preview.length<3;i--){const c=clean(reviews[i]?.content||'');const k=c.replace(/\s+/g,'').slice(0,320);if(k&&!seen.has(k)){seen.add(k);preview.push(c.slice(0,70)+(c.length>70?'…':''))}}
+ const currCount=dedupReviewCount();const reviewRatio=Math.min(1,currCount/reviewCap);const overallProg=Math.min(78,Math.round(20+reviewRatio*58));
+ updateInPageHud({count:currCount,round,progress:overallProg,message:mode||`评论采集中:${currCount}/${reviewCap}条`,elapsedMs:Date.now()-reviewStartedAt,preview});
+ window.__TMALL_AI_REVIEW_PROGRESS__={progress:overallProg,reviewCap,
count:dedupReviewCount(),
rawCount:reviews.length,
networkReviewObjects:reviewNetMeta.networkReviewObjects,
@@ -563,7 +625,7 @@ async function collector(manual=false,collectionMode='standard'){
// 每轮即时解析已捕获网络响应
const capNow=(window.__TMALL_AI_CAPTURE__||[]).slice(-120);for(const c of capNow){try{const ck=String(c.__safeKey||[c.method||'',c.url||'',String(c.text||'').slice(0,240)].join('|'));if(processedCaptureKeys.has(ck))continue;processedCaptureKeys.add(ck);if(/review|rate|comment|feed/i.test(c.url||''))reviewNetMeta.networkResponses++;let z=(c.text||'').replace(/^\s*[\w$.]+\(/,'').replace(/\)\s*;?\s*$/,'');try{walk(JSON.parse(z),0,c.url||'')}catch(_){const m=z.match(/\{[\s\S]*\}/);if(m)try{walk(JSON.parse(m[0]),0,c.url||'')}catch(__){}}}catch(e){}}
collectVisibleReviews();collectVisibleQuestions();const after=dedupReviewCount();stagnant=after<=before?stagnant+1:0;publishReviewProgress(round+1,stagnant,next?'翻页/加载更多':'短滚动',{lastDelta:after-before});
- if(collectionMode!=='full' && after>=reviewCap){collectionComplete=true;explicitEnd=true;stopReason='sample_cap';publishReviewProgress(round+1,stagnant,collectionMode==='quick'?'已采够快速样本':'已采够标准样本');break}
+ if(after>=reviewCap){collectionComplete=true;explicitEnd=true;stopReason='sample_cap';publishReviewProgress(round+1,stagnant,collectionMode==='quick'?'已采够快速样本':collectionMode==='full'?'已采够深度样本':'已采够标准样本');break}
const bodyNow=clean(document.body?.innerText||'');const noMoreText=/没有更多(?:评价|评论)|已显示全部(?:评价|评论)|到底了|暂无更多(?:评价|评论)/.test(bodyNow);const captcha=/验证码|滑块|安全验证|访问过于频繁|操作频繁/.test(bodyNow);
if(captcha){stopReason='human_verification_required';publishReviewProgress(round+1,stagnant,'需要人工验证');break}
if((disabledNext||noMoreText)&&stagnant>=1){explicitEnd=true;collectionComplete=true;stopReason='explicit_last_page';publishReviewProgress(round+1,stagnant,'页面明确结束');break}
@@ -807,6 +869,7 @@ async function collector(manual=false,collectionMode='standard'){
// 严禁“无新增/无下一页控件”单独作为完整依据
const completeness=collectionComplete?'confirmed':'unconfirmed';
await saveCheckpoint({reviews:[...deReview.values()],questions:[...deQ.values()],round:pagesVisited,updatedAt:Date.now(),complete:collectionComplete,stopReason,completeness,networkTotal,publicNumeric,reviewNetMeta});
+ finishInPageHud(collectionComplete, collectionComplete ? ('✓ 采集完成(已获取 ' + deReview.size + ' 条评论),正在提交分析...') : ('采集结束:已保存 ' + deReview.size + ' 条评论'));
return {
meta:{platform:location.hostname.includes('tmall')?'tmall':'taobao',collectedAt:new Date().toISOString(),url:location.href,collectorVersion:'9.2.2',imageClassificationVersion:'strict-v1',networkCaptures:captured.length,structuredRoots:roots.length},
product:{itemId,skuId,title,shop,brand:structured.brands[0]||scriptString(['brandName','brand'],120),category:structured.categories[0]||scriptString(['categoryName','catName'],160),url:location.href,parameterCollection},
diff --git a/extension/icon-128.png b/extension/icon-128.png
index b4f7dec..03ed70c 100644
Binary files a/extension/icon-128.png and b/extension/icon-128.png differ
diff --git a/extension/icon-16.png b/extension/icon-16.png
new file mode 100644
index 0000000..2c2f2fe
Binary files /dev/null and b/extension/icon-16.png differ
diff --git a/extension/icon-48.png b/extension/icon-48.png
new file mode 100644
index 0000000..e533530
Binary files /dev/null and b/extension/icon-48.png differ
diff --git a/extension/manifest.json b/extension/manifest.json
index cea8d51..29c4e1d 100644
--- a/extension/manifest.json
+++ b/extension/manifest.json
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
- "name": "三笙 · 电商商品分析闭环 V9.2.5",
- "version": "9.2.5",
+ "name": "三笙 · 电商商品分析闭环 V1.0",
+ "version": "1.0.0",
"description": "跨类目电商商品分析:动态参数与SKU采集、图文分源、评论证据、开品与AI视觉方案。",
"permissions": [
"scripting",
@@ -26,12 +26,18 @@
"service_worker": "background.js"
},
"icons": {
+ "16": "icon-16.png",
+ "48": "icon-48.png",
"128": "icon-128.png"
},
"action": {
"default_popup": "popup.html",
- "default_title": "三笙 · 电商商品分析闭环 V9.2.5",
- "default_icon": "icon-128.png"
+ "default_title": "三笙 · 电商商品分析闭环 V1.0",
+ "default_icon": {
+ "16": "icon-16.png",
+ "48": "icon-48.png",
+ "128": "icon-128.png"
+ }
},
"content_scripts": [
{
@@ -48,4 +54,4 @@
"world": "MAIN"
}
]
-}
+}
\ No newline at end of file
diff --git a/extension/popup.css b/extension/popup.css
index fa5025e..ec11ae7 100644
--- a/extension/popup.css
+++ b/extension/popup.css
@@ -182,3 +182,68 @@ main { padding: 14px 16px 18px; }
.mode.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.mode.active small { color: #c6d1d3; }
.option-note { margin-top: 8px; color: var(--muted); font-size: 10px; text-align: center; }
+
+/* 采集流程四步可视化指示条 */
+.steps-tracker {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-top: 14px;
+ padding: 10px 12px;
+ background: var(--soft);
+ border-radius: 8px;
+ border: 1px solid var(--line);
+}
+.tracker-item {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 4px;
+ min-width: 0;
+}
+.tracker-dot {
+ width: 8px;
+ height: 8px;
+ border-radius: 50%;
+ background: #b5c3c6;
+ transition: all 0.25s ease;
+}
+.tracker-label {
+ font-size: 11px;
+ color: var(--muted);
+ font-weight: 500;
+ white-space: nowrap;
+}
+.tracker-label small {
+ display: inline-block;
+ font-size: 9px;
+ background: rgba(0, 169, 143, 0.15);
+ color: var(--green-dark);
+ padding: 1px 4px;
+ border-radius: 4px;
+ font-weight: 700;
+ margin-left: 2px;
+}
+.tracker-line {
+ flex: 1;
+ height: 2px;
+ background: var(--line);
+ margin: 0 4px 14px 4px;
+}
+.tracker-item.active .tracker-dot {
+ background: var(--blue);
+ box-shadow: 0 0 0 4px rgb(22 117 209 / 18%);
+ transform: scale(1.15);
+}
+.tracker-item.active .tracker-label {
+ color: var(--blue);
+ font-weight: 700;
+}
+.tracker-item.done .tracker-dot {
+ background: var(--green);
+ box-shadow: 0 0 0 3px rgb(0 169 143 / 15%);
+}
+.tracker-item.done .tracker-label {
+ color: var(--green-dark);
+ font-weight: 600;
+}
diff --git a/extension/popup.html b/extension/popup.html
index a2bc6ce..361b765 100644
--- a/extension/popup.html
+++ b/extension/popup.html
@@ -13,7 +13,7 @@
三笙商品分析
- 电商单品洞察
+ 电商单品洞察 V1.0
@@ -43,7 +43,29 @@
0%
请打开天猫或淘宝商品详情页
-
+
+
+
+
+
+ 基本信息
+
+
+
+
+ 规格参数
+
+
+
+
+ 买家评价
+
+
+
+
+ 云端报告
+
+
分析会在后台继续,可以关闭扩展或继续浏览商品。
@@ -104,13 +126,13 @@