feat: 7月迭代
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m21s

This commit is contained in:
luo
2026-07-28 14:00:22 +08:00
parent f0a2b84e53
commit 2706c52a47
63 changed files with 4113 additions and 3945 deletions

View File

@@ -8,13 +8,52 @@ type TargetRoute = {
}
const resolveTargetRoute = (target: NotificationTarget): TargetRoute | null => {
const targetValues = [target.target_key, target.target_type]
const targetId = target.target_id === null ? undefined : String(target.target_id)
const targetKey = target.target_key || ''
if (targetValues.includes('expiring_assets') || targetValues.includes('expiring_asset_list')) {
if (target.target_type === 'refund_detail' && targetId) {
return { path: `${RoutesAlias.RefundDetail}/${targetId}` }
}
if (target.target_type === 'agent_recharge_detail' && targetId) {
return { path: `${RoutesAlias.AgentRechargeDetail}/${targetId}` }
}
if (target.target_type === 'iot_card_detail' && (targetKey || targetId)) {
return {
path: RoutesAlias.AssetInformation,
query: { iccid: targetKey || targetId || '' }
}
}
if (target.target_type === 'device_detail' && (targetKey || targetId)) {
return {
path: RoutesAlias.AssetInformation,
query: { virtual_no: targetKey || targetId || '' }
}
}
if (
target.target_type === 'expiring_asset_list' ||
target.target_key === 'expiring_assets' ||
target.target_key === 'expiring_asset_list'
) {
return { path: RoutesAlias.ExpiringAssets }
}
if (targetValues.includes('notification_center')) return { path: RoutesAlias.Notifications }
if (target.target_type === 'shop_fund_summary') {
return {
path: RoutesAlias.AgentFundOverview,
query: targetId ? { shop_id: targetId } : undefined
}
}
if (target.target_type === 'system_config') {
return {
path: RoutesAlias.SystemConfigs,
query: targetKey ? { config_key: targetKey } : undefined
}
}
return null
}