consumer模块完成度95%,检查消费者前端bug并修复
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user