consumer模块完成度95%,检查消费者前端bug并修复

This commit is contained in:
cyh666666
2026-03-09 17:20:59 +08:00
parent 7b5801a72b
commit 2262d1bfd9
128 changed files with 13485 additions and 1670 deletions

View File

@@ -99,7 +99,6 @@ const loadRecords = async (): Promise<void> => {
for (let i = 0; i < result.length; i++) {
const item = result[i]
const itemAny = item as any
let id = ''
let type = ''
@@ -109,16 +108,21 @@ const loadRecords = async (): Promise<void> => {
let description: string | null = null
let createdAt = ''
if (typeof itemAny._getValue === 'function') {
id = (itemAny._getValue('id') as string) ?? ''
type = (itemAny._getValue('type') as string) ?? ''
amount = (itemAny._getValue('amount') as number) ?? 0
balanceBefore = (itemAny._getValue('balance_before') as number) ?? 0
balanceAfter = (itemAny._getValue('balance_after') as number) ?? 0
description = itemAny._getValue('description') as string | null
createdAt = (itemAny._getValue('created_at') as string) ?? ''
let itemObj: UTSJSONObject | null = null
if (item instanceof UTSJSONObject) {
itemObj = item
} else {
itemObj = JSON.parse(JSON.stringify(item)) as UTSJSONObject
}
id = itemObj.getString('id') ?? ''
type = itemObj.getString('type') ?? ''
amount = itemObj.getNumber('amount') ?? 0
balanceBefore = itemObj.getNumber('balance_before') ?? 0
balanceAfter = itemObj.getNumber('balance_after') ?? 0
description = itemObj.getString('description')
createdAt = itemObj.getString('created_at') ?? ''
parsed.push({
id,
type,