fix(jd-publish): 多店未检测不再挂「发错店判死」琥珀警告小字
客户口径「不存在发错店的情况」「小字都删了阿不需要」:未检测京麦时按登录店新建上架 是确定行为,页面不再建议先检测、不再警告「发错店会被整单判死」。 - jd-publish-shop.ts:删 multiShopDetectMessage,multi 未检测档 message 置空串 (已检测档仍显形目标店与新建上架说明) - JdPublishTab.vue:琥珀块加 message 非空条件,空串不渲染空块(落默认灰色提示) - 测试反向更新:未检测档断言 message 空串、页面文本不得出现「发错店」; 反向红绿验证(恢复旧文案→纯函数 1 红+mount 1 红,复原全绿)
This commit is contained in:
@@ -862,8 +862,9 @@ onUnmounted(() => {
|
||||
<p v-if="shopError" class="shop-alert">{{ shopError }}</p>
|
||||
<!-- 协议不够:升级提示在前(NEW 任务只投给 v4+ 客户端),跨店/多店同受这道闸。 -->
|
||||
<p v-else-if="needsCrossProtocol && !crossSupported" class="shop-alert">{{ CROSS_UPGRADE_NOTICE }}</p>
|
||||
<!-- 跨店/多店(已检测钉定目标店或未检测 targetFromLogin):琥珀说明,不再拦建单。 -->
|
||||
<p v-else-if="shopGuard.state === 'cross' || shopGuard.state === 'multi'" class="shop-alert shop-alert--cross">{{ shopGuard.message }}</p>
|
||||
<!-- 跨店/多店(已检测钉定目标店):琥珀说明。多店未检测不产警告句(2026-11-28 客户口径
|
||||
「不存在发错店的情况」:按京麦当前登录店发布,不再挂建议小字),message 空串不渲染空琥珀块。 -->
|
||||
<p v-else-if="(shopGuard.state === 'cross' || shopGuard.state === 'multi') && shopGuard.message" class="shop-alert shop-alert--cross">{{ shopGuard.message }}</p>
|
||||
<p v-else-if="shopGuard.state === 'match'" class="shop-ok">
|
||||
店铺一致:商品会发布到「{{ shopLabel(shopGuard.expected) }}」。
|
||||
</p>
|
||||
|
||||
@@ -121,17 +121,6 @@ export function multiShopCrossMessage(shops: ReadonlyArray<JdShopRef>, target: J
|
||||
+ '新建上架(需类目已授权,并通过京东审核)。')
|
||||
}
|
||||
|
||||
/**
|
||||
* 多店还没检测京麦:建议句(2026-11-28 客户口径「不要限制」后不再拦建单)——
|
||||
* 不检测也照常建单(targetFromLogin),客户端按京麦当前登录店发布;检测可钉定目标店、
|
||||
* 客户端发布前会强核对,发了不匹配的店会整单判死,所以仍建议先检测。
|
||||
*/
|
||||
export function multiShopDetectMessage(shops: ReadonlyArray<JdShopRef>): string {
|
||||
const labels = shops.map((shop) => shopLabel(shop)).join('、')
|
||||
return (`勾选的商品来自多个店铺(${labels}),将按京麦当前登录店铺新建上架;`
|
||||
+ '建议先点「检测京麦店铺」钉定目标店,发错店会被整单判死。')
|
||||
}
|
||||
|
||||
/** true/false=能比;null=两边都缺可比字段(只认同一维度:id 对 id、名对名)。 */
|
||||
function sameShop(expected: JdShopRef, actual: JdShopRef): boolean | null {
|
||||
if (expected.shopId && actual.shopId) return expected.shopId === actual.shopId
|
||||
@@ -151,7 +140,10 @@ export function evaluateShopGuard(
|
||||
state: 'multi',
|
||||
shops: refs,
|
||||
target: actual,
|
||||
message: actual ? multiShopCrossMessage(refs, actual) : multiShopDetectMessage(refs),
|
||||
// 未检测档不产说明句(2026-11-28 客户口径「不存在发错店的情况」:按京麦当前登录店
|
||||
// 发布,页面不再挂「建议先检测/发错店判死」警告小字,落默认灰色提示);
|
||||
// 已检测档仍显形目标店与新建上架说明。
|
||||
message: actual ? multiShopCrossMessage(refs, actual) : '',
|
||||
}
|
||||
}
|
||||
const expected = refs[0]
|
||||
|
||||
Reference in New Issue
Block a user