diff --git a/apps/frontend/public/images/products/lucky_coin_x2.webp b/apps/frontend/public/images/products/lucky_coin_x2.webp index d84b9cec..e73f957a 100644 Binary files a/apps/frontend/public/images/products/lucky_coin_x2.webp and b/apps/frontend/public/images/products/lucky_coin_x2.webp differ diff --git a/apps/frontend/public/images/products/lucky_coin_x30.webp b/apps/frontend/public/images/products/lucky_coin_x30.webp index 507617cc..e73f957a 100644 Binary files a/apps/frontend/public/images/products/lucky_coin_x30.webp and b/apps/frontend/public/images/products/lucky_coin_x30.webp differ diff --git a/apps/frontend/public/images/products/lucky_coin_x90.webp b/apps/frontend/public/images/products/lucky_coin_x90.webp index 7767a856..e73f957a 100644 Binary files a/apps/frontend/public/images/products/lucky_coin_x90.webp and b/apps/frontend/public/images/products/lucky_coin_x90.webp differ diff --git a/apps/frontend/src/pages/claim/ClaimAffiliateDashSteps.tsx b/apps/frontend/src/pages/claim/ClaimAffiliateDashSteps.tsx index 3b8835b2..26d6ecd8 100644 --- a/apps/frontend/src/pages/claim/ClaimAffiliateDashSteps.tsx +++ b/apps/frontend/src/pages/claim/ClaimAffiliateDashSteps.tsx @@ -11,7 +11,11 @@ import { useEffect, useState } from 'react' import { formatAdminDateTime } from '@/utils/admin-time' import { showSuccess } from '@/lib/feedback' import type { ClaimAffiliateDashFlowInfo } from '@/types/claim' -import { generateVoucherDataURL, copyVoucherDataUrlToClipboard } from '@/utils/voucher' +import { + generateVoucherDataURL, + copyVoucherDataUrlToClipboard, + formatGameChannelLabel, +} from '@/utils/voucher' import { normalizeUid } from './claim-snapshot' import type { ClaimSnapshot } from './claim-snapshot' import { ClaimProductItems, InfoTile, UidEditRow } from './claim-shared' @@ -168,7 +172,7 @@ export function AffiliateDashClaimPanel({ description={ [ roleName ? `游戏角色:${roleName}` : '', - gameChannel ? `渠道:${gameChannel}` : '', + gameChannel ? `渠道:${formatGameChannelLabel(gameChannel)}` : '', skipScanAuthorized ? '该账号此前已授权,本次免扫码' : '', ] .filter(Boolean) @@ -351,7 +355,7 @@ export function AffiliateDashResultStep({ snapshot }: { snapshot: ClaimSnapshot - + diff --git a/apps/frontend/src/utils/voucher.ts b/apps/frontend/src/utils/voucher.ts index 5848e434..3a4429b0 100644 --- a/apps/frontend/src/utils/voucher.ts +++ b/apps/frontend/src/utils/voucher.ts @@ -98,6 +98,23 @@ const PRODUCT_SKU_MAP: Record = { 蓝色运动服: 'rock_blue_sportswear', } +/** + * 格式化和平精英官方/DLC 渠道代码 (area-plat) 为用户易读的中文区服名称 + * + * 腾讯大区 (area):1=微信, 2=手Q + * 操作系统 (plat):1=安卓, 0=苹果 (iOS) + */ +export function formatGameChannelLabel(channel?: string): string { + const c = String(channel || '').trim() + if (c === '1-1') return '安卓-微信' + if (c === '1-0') return '苹果-微信' + if (c === '2-1') return '安卓-手Q' + if (c === '2-0') return '苹果-手Q' + if (c === '1' || c.toLowerCase() === 'wx' || c.toLowerCase() === 'weixin') return '微信区' + if (c === '2' || c.toLowerCase() === 'qq') return '手Q区' + return c || '安卓-微信' +} + export function resolveVoucherProductImageUrl(data: DeliveryVoucherData): string { const sku = (data.productSKU || '').trim() if (sku && PRODUCT_SKU_MAP[sku]) { @@ -304,7 +321,7 @@ export async function generateVoucherDataURL(data: DeliveryVoucherData): Promise } listItems.push( - { label: '游戏区服', value: data.channel || '安卓-微信' }, + { label: '游戏区服', value: formatGameChannelLabel(data.channel) }, { label: '兑换账号', value: data.roleUID || '-' }, { label: '兑换时间', value: data.redeemedAt || new Date().toLocaleString() }, )