Files

52 lines
2.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Shopee 当前状态:脚本就绪,卡在店铺授权(2026-09-30)
**一句话**:本目录的配方(含 `spbatch.mjs`)依然有效——本仓库记录过 **店铺 `Ljbgkj` 47 条进待发布**;
但 2026-09-30 复跑时,`/web/shopeeGlobal/add` 的「商家账号」下拉是 **「暂无数据」**,
所以**不是平台从未授权,而是当前登录账号的店铺授权异常/范围不足**。
## 证据链
| 证据 | 内容 |
|---|---|
| 页面 | `GET /web/shopeeGlobal/add` + 点开「商家账号」→ `暂无数据`(无 `.ant-select-item-option`) |
| 首页告警 | 店小秘首页挂着 `/web/system/authorization/platform?go=shopee` 的「去处理>>」 |
| 授权页 | 子账号打开 `/web/system/authorization/platform?go=shopee` → 只有「没有该功能访问权限,主账号授权后重新登录」 |
| 对照 | 同一天同一账号:**TikTok 10 店、速卖通 10 店**下拉正常 → 不是 CDP/脚本问题 |
| 历史 | 本仓库 2026-09 记录 Shopee `Ljbgkj` **47 条进待发布**(当时店铺可见) |
## 解锁步骤
1. **主账号**登录店小秘 → 平台授权 → 处理 Shopee 的「授权异常」(重新授权/续期)。
2. 复跑自检(无店铺会直接判 ⛔ 并跳过,不产生垃圾数据):
```bash
node listing-spec/platform-shared/preflight-shops.mjs --routes /web/shopeeGlobal/add
```
3. 有店之后再跑:
```bash
python3 listing-spec/platform-shared/build-add-input.py <package>.json \
--platform Shopee-全球 --out /tmp/sp_input.json --min-side 400
node listing-spec/platform-shopee/spbatch.mjs --input /tmp/sp_input.json --only <oid> --dry
node listing-spec/platform-shopee/spbatch.mjs --input /tmp/sp_input.json --only <oid>
```
## 复跑必守的两条
* **「上架后自动发布到店铺」是 checkbox,必须不勾**(勾了 = 保存即发布,违反「只到待发布」)。
* 类型默认是 `mutiple`(多变种,价格/库存只能按变种填)→ 切 `input[type=radio][value=single]` 单品模式。
## 账号级证据(2026-09-30 实测,一次接口)
`GET /api/userIn.json` → `data.shopMap`(key=shopId,value 含 `name`/`platform`):
```
256 家店 → smt:61 tiktok:98 tiktokGlobal:24 aliChoice:65 ozon:5 walmart:3
```
**没有任何 `shopee` / `shopeeGlobal` 店铺** —— 与 Shopee 建listing 页「商家账号」下拉「暂无数据」完全吻合。
即当前登录(子账号 `ejetZhangjiafen`)在**账号层面**就没有 Shopee 店铺;
本仓库历史记录的 Shopee `Ljbgkj` 47 条,是在**当时可见该店铺的登录态**下完成的
→ 结论:**授权异常 / 账号范围变化**,需**主账号**处理,不是脚本问题。
★ 注意:**页面上的店铺下拉只是子集**(速卖通页只列 10 家,账号里 61 家)
→ 判「有没有店」用 `readAccountShops()`;判「这个店能不能在这个页面选到」才用 `listShopOptions()`。