Files
cmautobuy/docs/task/163-商品页补采滑动上限调整为3次.md
T
2026-08-11 16:40:36 +08:00

49 lines
1.7 KiB
Markdown
Raw 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.
# #163 Client:商品详情补采最大滑动次数调整为3次
- 工单号:#163
- 类型:优化
- 父级:Epic #1、MVP #2
- 版本:Client 可运行任务闭环
- 状态:待验收
- 日期:2026-08-11
- Gitea:<http://ilaer.eicp.net:8418/chengma/cmautobuy/issues/163>
## 背景与目标
商品详情页补采评价数量和店铺名时,默认最多向下滑动 6 次。用户确认进一步
调整为 3 次,以缩短进入规格面板前的等待时间。
## 最终方案
把 `PddCollectService.max_goods_page_swipes` 默认值从 6 改为 3。找齐店铺名和
评价数量时立即停止、页面连续不变化时提前停止,以及单次滑动距离和等待时间均
保持不变。
## 改了哪些文件
- `client/src/pdd_collect_service.py`:默认补采滑动上限改为 3。
- `client/test/test_pdd_collect_service.py`:更新默认上限回归测试。
## 验收结果
- [x] 默认配置最多滑动 3 次。
- [x] 找齐字段后仍立即停止。
- [x] 页面连续不变化时仍提前停止。
- [x] 未改变规格采集流程。
- [x] 精确测试、Client 全量测试和语法检查通过。
- [ ] 用户使用真机确认采集耗时和字段结果。
## 测试
在 `client/` 目录执行:
```powershell
C:/Python310/python.exe -m unittest discover -s test -p "test_pdd_collect_service.py"
C:/Python310/python.exe -m unittest discover -s test -p "test_*.py"
C:/Python310/python.exe -m py_compile src/pdd_collect_service.py test/test_pdd_collect_service.py
```
结果:采集服务 53 项通过,Client 完整 410 项通过,语法检查通过。
未验证到的部分:未使用真机复验;未执行采购、下单或付款。