fix(listings): 首页无论是否可修改游戏名都展示该字段

号主选择「否」时买家也能在商品卡片上看到,避免只展示「是」造成信息缺失。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
yml2213
2026-10-01 16:06:15 +08:00
co-authored by Cursor
parent 2a76d59a30
commit a1008f7e6a
2 changed files with 25 additions and 4 deletions
+4 -3
View File
@@ -155,9 +155,10 @@ export function getListingChips(item: PublicListingItem): ListingDisplayChip[] {
if (online) {
chips.push({ label: '方便上号', value: online })
}
// 仅在号主确认可修改游戏名时展示。
if (readAssetString(item, 'can_change_game_name') === '是') {
chips.push({ label: '可修改游戏名', value: '是' })
// 号主已填写时,首页同时展示「是」和「否」。
const canChangeGameName = readAssetString(item, 'can_change_game_name')
if (canChangeGameName === '是' || canChangeGameName === '否') {
chips.push({ label: '可修改游戏名', value: canChangeGameName })
}
// 全英雄为必选项,仅在号主勾选「是」时展示
if (readAssetString(item, 'all_hero') === '是') {