fix(jd-collect): 进度条 0 行进行时文案——首批分片确认前不再挂「已采集 0 个商品」像卡死
This commit is contained in:
@@ -405,10 +405,16 @@ function progressPercent(item: JdCollectHistoryItemVo) {
|
||||
|
||||
/** 计数文案:有 total 带分母和百分比「已采集 30/100 个商品(30%)」——TaskItemCard 的
|
||||
* countLabel 会顶掉「总进度 X%」那行字,百分比只能随 countLabel 一起出;
|
||||
* 没有 total 保持只报行数,不编造分母(与本页 progressPercent 同一口径)。 */
|
||||
* 没有 total 保持只报行数,不编造分母(与本页 progressPercent 同一口径)。
|
||||
* 2026-11-21 35089 实录补进行时档:首批分片被服务端收下前 itemsReceived 恒 0(页内
|
||||
* 详情采集要 1-3 分钟)、「已采集 0 个商品」像卡死,用户误以为失败点了删除(35088/
|
||||
* 35089/35090 三单都被这样删掉,数据采集成功但随删除清库)。0 行时改报进行时文案。 */
|
||||
function progressCountLabel(item: JdCollectHistoryItemVo) {
|
||||
const received = collectedCount(item)
|
||||
const total = typeof item.total === 'number' && item.total > 0 ? item.total : null
|
||||
if (!received && normalizeTaskStatus(item) !== 'SUCCESS') {
|
||||
return total ? `已采 0/${total} 个商品(正在采集中…)` : '正在采集,首批数据确认后开始计数…'
|
||||
}
|
||||
if (!total) return `已采集 ${received} 个商品`
|
||||
return `已采集 ${received}/${total} 个商品(${progressPercent(item)}%)`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user