liufumingren
db2c232aad
修正店小秘面单 PDF 取错接口(取到「发货单不存在」的错误 PDF)
问题:之前用 /api/pddkjInventory/printExpressNote.json?id=<包裹ID> 取面单,
那是「拼多多跨境备货单」的标签接口,传订单包裹ID 会返回一张解压后文字为
「发货单不存在」的 PDF(同样以 %PDF 开头,只看前缀查不出来)。
修正:改用服务端打印页 printMb.htm
GET /printMb.htm?packageIds=<包裹ID>&authId=<店铺授权ID>&isCos=1
→ 302 https://print.dianxiaomi.com/<日期>/<uuid>.pdf → 200 application/pdf
- 新增 requestPdf(手动处理跳转,跨域那一跳不带 OMS 账号 cookie)
- fetchPrintPdf 改走 printMb.htm;仍保留 checkPrint 取面单格式/校验
- 单测改为验证两跳链路(打印页带 cookie、跨域 PDF 不带 cookie),补 302 缺 location 的用例
- 文档 6/6.1 更新下载方式,并记下 printExpressNote 的坑
实测(包裹 184804424061188407 / 运单 3CAB6112200001):
面单 base64 150,136 字符,解码文字含收件人 Daniel Puccio / 92223 / +19515057679;
取号记录 pdf_base64 落库 150,136、result_data 仅 417 字节。
本地已清掉两条用错误接口生成的取号记录与幂等记录。
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-24 18:41:54 +08:00
..
2026-11-08 19:05:30 +08:00
2026-11-07 22:35:37 +08:00
2026-11-09 03:06:53 +08:00
2026-11-09 20:16:53 +08:00
2026-11-07 19:02:19 +08:00
2026-11-08 18:01:24 +08:00
2026-11-07 23:14:48 +08:00
2026-11-07 09:46:45 +08:00
2026-11-07 23:24:35 +08:00
2026-11-07 22:56:20 +08:00
2026-11-07 09:22:16 +08:00
2026-11-08 19:05:30 +08:00
2026-11-14 01:14:18 +08:00
2026-11-07 22:48:33 +08:00
2026-11-07 09:22:16 +08:00
2026-11-03 03:29:09 +08:00
2026-11-08 11:28:18 +08:00
2026-11-08 11:28:18 +08:00
2026-11-13 23:17:21 +08:00
2026-11-13 22:42:57 +08:00
2026-11-24 03:08:07 +08:00
2026-11-07 22:04:37 +08:00
2026-11-23 21:13:48 +08:00
2026-11-24 18:41:54 +08:00
2026-11-07 22:08:31 +08:00
2026-11-13 23:17:21 +08:00
2026-11-07 19:40:33 +08:00
2026-11-24 00:17:27 +08:00
2026-11-07 17:56:42 +08:00
2026-11-08 18:01:24 +08:00
2026-11-24 02:20:56 +08:00
2026-11-07 07:40:30 +08:00
2026-11-07 22:29:11 +08:00