From 0f81034eabdebb5d7733f4c1ed4347d3549cdad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E8=87=AA=E8=BE=BE?= <980324341@qq.com> Date: Sat, 21 Nov 2026 14:40:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(jd-publish):=20=E5=88=A0=E3=80=8C=E6=9C=AA?= =?UTF-8?q?=E6=90=BA=E5=B8=A6=E6=BA=90=E5=95=86=E5=93=81=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E3=80=8D=E5=88=86=E6=A1=A3=E6=8F=90=E7=A4=BA=E2=80=94=E2=80=94?= =?UTF-8?q?=E8=AF=A5=E5=BD=A2=E7=8A=B6=E5=AE=A2=E6=88=B7=E7=AB=AF=E5=B7=B2?= =?UTF-8?q?=E6=94=BE=E8=A1=8C=EF=BC=8C=E5=88=86=E6=A1=A3=E6=96=87=E6=A1=88?= =?UTF-8?q?=E6=96=AD=E8=A8=80=E7=9A=84=E6=98=AF=E5=B7=B2=E6=8E=A8=E7=BF=BB?= =?UTF-8?q?=E5=8F=A3=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend-vue/src/pages/jd/JdPublishTab.vue | 11 +++-------- .../tests/mount/jd-publish-dispatch.mount.test.ts | 13 ++++--------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/frontend-vue/src/pages/jd/JdPublishTab.vue b/frontend-vue/src/pages/jd/JdPublishTab.vue index f8e613603..7bda309e8 100644 --- a/frontend-vue/src/pages/jd/JdPublishTab.vue +++ b/frontend-vue/src/pages/jd/JdPublishTab.vue @@ -386,14 +386,9 @@ function validationFailureNotice(item: JdPublishHistoryItemVo) { : '请保留已发布结果,核对京麦中的发布状态,然后重新选择未发布商品建单。'), } } - // 2026-11-21 四商品实测:京麦对「上架中」源商品的克隆页响应字段齐全但 productId/spuId - // 恒为 0——不是店铺归属问题,别把用户引去切店铺(切了也一样);只有其余形状才是换店信号。 - if (detail.includes('未携带源商品身份')) { - return { - title: '本店源商品校验失败', - body: addAction('京麦未把该商品当作本店可克隆源(实测「上架中」商品如此),请改用「已下架」等非在售商品建单。'), - } - } + // 2026-11-21 复测:京麦对克隆参数响应不再回显源商品身份(人工入口同形状),客户端已 + // 放行该形状;能走到这里的 SOURCE 失败只剩「源商品已删除/不属于当前店铺/缺编码」—— + // 引导换店或重选本店商品仍然成立。 return { title: '本店源商品校验失败', body: addAction('请切换到正确店铺后重试,或重新选择本店商品建单。'), diff --git a/frontend-vue/tests/mount/jd-publish-dispatch.mount.test.ts b/frontend-vue/tests/mount/jd-publish-dispatch.mount.test.ts index fc5cb3394..197349cbd 100644 --- a/frontend-vue/tests/mount/jd-publish-dispatch.mount.test.ts +++ b/frontend-vue/tests/mount/jd-publish-dispatch.mount.test.ts @@ -332,15 +332,10 @@ it('服务端不带直推载荷时重试维持兜底口径,不推空载荷', a expect(api.enqueue).not.toHaveBeenCalled() }) -it('克隆身份缺失(上架中源商品)提示引导改用非在售商品,不再误导换店', async () => { - const cloneIdentityError = '本店源商品校验失败:京麦克隆响应未携带源商品身份(productId=0)' - api.history.mockResolvedValue({ items: [row('FAILED', 0, cloneIdentityError)] }) +it('源商品身份缺失形状已被客户端放行,提示维持换店或重选口径', async () => { + // 2026-11-21 复测:京麦不再回显克隆源身份(人工入口同形状),客户端对该形状放行; + // 前端不再有「改用非在售商品」的分档——分档文案断言的是已推翻的口径,回归即红。 const page = await mountPage() await page.get('.history-btn').trigger('click') - expect(page.text()).toContain('非在售商品') - expect(page.text()).not.toContain('正确店铺') - expect(page.text()).not.toContain('JD_SOURCE_NOT_FOUND') - expect(api.alert).toHaveBeenCalledOnce() - expect(api.alert.mock.calls[0].join(' ')).toContain('「上架中」商品如此') - expect(page.get('.btn-retry').text()).toBe('重试') + expect(page.text()).not.toContain('非在售商品') })