fix(voucher): 替换幸运币纯净无水印透明底素材并统一区服渠道中文转换
- 将幸运币 2/30/90 个 webp 素材替换为纯净 RGBA 透明金币立绘,消除白底多边形及「幸运币礼包(小)」文字水印 - 增加 formatGameChannelLabel 转换函数:将腾讯/DLC area-plat 协议代号(如 1-1)统一转换为用户友好的「安卓-微信」 - 领取页第 2/3/4 步与凭据大图全局统一应用区服中文转换
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 9.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 9.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 9.7 KiB |
@@ -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
|
||||
<InfoTile label="领取商品" value={snapshot.product?.title || '-'} />
|
||||
<InfoTile label="绑定账号" value={boundAccount || '-'} />
|
||||
<InfoTile label="游戏角色" value={roleName || '-'} />
|
||||
<InfoTile label="游戏渠道" value={gameChannel || '-'} />
|
||||
<InfoTile label="游戏渠道" value={formatGameChannelLabel(gameChannel) || '-'} />
|
||||
<InfoTile label="结果时间" value={redeemedAt} />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -98,6 +98,23 @@ const PRODUCT_SKU_MAP: Record<string, string> = {
|
||||
蓝色运动服: '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() },
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user