fix(voucher): 替换幸运币纯净无水印透明底素材并统一区服渠道中文转换

- 将幸运币 2/30/90 个 webp 素材替换为纯净 RGBA 透明金币立绘,消除白底多边形及「幸运币礼包(小)」文字水印
- 增加 formatGameChannelLabel 转换函数:将腾讯/DLC area-plat 协议代号(如 1-1)统一转换为用户友好的「安卓-微信」
- 领取页第 2/3/4 步与凭据大图全局统一应用区服中文转换
This commit is contained in:
yml2213
2026-10-10 21:18:31 +08:00
parent f3f2550b19
commit ed8bdf399d
5 changed files with 25 additions and 4 deletions
+18 -1
View File
@@ -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() },
)