游戏-用户管理-优化样式增强验证

This commit is contained in:
2026-04-03 18:09:17 +08:00
parent cf381bf02c
commit 9940af960b
4 changed files with 1136 additions and 3 deletions

View File

@@ -175,7 +175,7 @@ const baTable = new baTableClass(
status: '1',
tier_weight: jsonStringFromFixedKeys(TIER_WEIGHT_KEYS, {}),
bigwin_weight: jsonStringFromFixedKeys(BIGWIN_WEIGHT_KEYS, {}),
ticket_count: '[]',
ticket_count: null,
},
}
)

View File

@@ -355,6 +355,9 @@ function ticketRowsToJsonString(rows: TicketRow[]): string {
const nc = Number(c)
body.push({ ante: na, count: nc })
}
if (body.length === 0) {
return ''
}
return JSON.stringify(body)
}
@@ -364,10 +367,11 @@ function syncTicketToForm() {
const a = ticketRows.value[0]?.ante?.trim() ?? ''
const c = ticketRows.value[0]?.count?.trim() ?? ''
if (a === '' || c === '') {
items.ticket_count = ''
items.ticket_count = null
return
}
items.ticket_count = ticketRowsToJsonString(ticketRows.value)
const json = ticketRowsToJsonString(ticketRows.value)
items.ticket_count = json === '' ? null : json
}
function applyTierBigwinFromJson(tierJson: string, bigwinJson: string) {