feat(semi-auto): 客户链接按平台严格绑定,注入后统一由前端打开指定页

This commit is contained in:
2026-11-17 17:27:19 +08:00
parent 7bd5b8bade
commit 77e1c69a2b
13 changed files with 459 additions and 56 deletions
@@ -503,7 +503,7 @@ export async function createSemiAutoMock(
skuKey,
connectorMode,
connectorConfigured,
customerPath: `/c/${encodeURIComponent(orderNo)}`,
customerPath: buildMockCustomerPath(platform, orderNo),
adminPath: `/admin/semi-auto-tasks?keyword=${encodeURIComponent(orderNo)}`,
tips:
platform === 'weibo'
@@ -781,7 +781,7 @@ export async function createSemiAutoIntegrationMock(
connectorMode,
connectorConfigured,
mappingId,
customerPath: `/c/${encodeURIComponent(orderNo)}`,
customerPath: buildMockCustomerPath(platform, orderNo),
adminPath: `/admin/semi-auto-tasks?keyword=${encodeURIComponent(orderNo)}`,
tips: [
'订单通过正式 upsertOrderFromSource 入库。',
@@ -802,6 +802,10 @@ function normalizeMockSemiAutoPlatform(value: unknown): 'huya' | 'weibo' {
: 'huya'
}
function buildMockCustomerPath(platform: 'huya' | 'weibo', orderNo: string): string {
return `/${platform === 'weibo' ? 'd' : 'c'}/${encodeURIComponent(orderNo)}`
}
function normalizeMockSemiAutoConnectorMode(value: unknown): SemiAutoConnectorMode {
const mode = String(value || '')
.trim()