- TikTok/Shopee/速卖通/Walmart 各 46-47 条已在待发布 - Ozon 47 条已建、改价 40/47 - SHEIN 配方跑通第一条;Temu 差「预览图」一步 - 核心产出:MYJ.message.error 钩子诊断法(解开了三个平台的保存静默拦截) - 含下一轮提示词 NEXT-ROUND-PROMPT.md
23 lines
1.8 KiB
JavaScript
23 lines
1.8 KiB
JavaScript
import { attach } from '/tmp/cdp3.mjs';
|
|
const wait = ms => new Promise(z => setTimeout(z, ms));
|
|
const c = await attach('/web/sheinProduct/add') || await attach('dianxiaomi.com');
|
|
const r = await c.evalJS(`(()=>{const box=[...document.querySelectorAll('.theme-select-box')].filter(e=>e.offsetParent!==null).pop();
|
|
if(!box)return'nf';
|
|
const chips=[...box.querySelectorAll('*')].filter(e=>e.offsetParent!==null&&/^\\s*尺寸\\(Size\\)\\s*$/.test((e.innerText||'').trim()));
|
|
if(!chips.length)return'no-chip';
|
|
const el=chips[chips.length-1];
|
|
for(const ev of ['mousedown','mouseup','click']) el.dispatchEvent(new MouseEvent(ev,{bubbles:true,cancelable:true,view:window}));
|
|
return 'clicked';})()`);
|
|
console.log('点尺寸:', String(r));
|
|
await wait(4000);
|
|
const o = await c.evalJS(`(()=>{const p=document.querySelector('#app').__vue_app__.config.globalProperties.$pinia;
|
|
const a=JSON.parse(JSON.stringify(p._s.get('sheinSkuAttrStore').$state));
|
|
const boxes=[...document.querySelectorAll('.sku-info-box')].filter(e=>e.offsetParent!==null).map((b,i)=>({
|
|
i, txt:(b.innerText||'').replace(/\\s+/g,' ').slice(0,90), opts:b.querySelectorAll('.sku-option').length,
|
|
sels:[...b.querySelectorAll('.ant-select')].map(s=>(s.innerText||'').replace(/\\s+/g,' ').slice(0,16)),
|
|
ins:[...b.querySelectorAll('input')].filter(i=>i.offsetParent!==null&&i.type!=='checkbox').map(i=>({ph:i.placeholder||'',cls:String(i.className||'').slice(0,40)})).slice(0,4)}));
|
|
const btns=[...document.querySelectorAll('button')].filter(b=>b.offsetParent!==null&&/添加/.test(b.innerText||'')).map(b=>({t:(b.innerText||'').trim(),dis:b.disabled}));
|
|
return JSON.stringify({attrs:(a.formState.skuAttrs||[]).map(x=>({n:x.name, opts:(x.options||[]).length})), boxes, btns},null,1);})()`);
|
|
console.log(String(o).slice(0,1400));
|
|
process.exit(0);
|