fix data-report bug

This commit is contained in:
yulixing 2019-08-21 19:59:13 +08:00
parent 81c0ef5e07
commit 0d3e5791c5

View File

@ -107,9 +107,9 @@ router.get('/report', async (req, res, next) => {
for (const key in record) {
if (record.hasOwnProperty(key)) {
const idx = methodData.fields_order[key]
const field_name =
key === 'item_id' ? '道具名称/ID' : methodData.fields[key]
if (idx) {
const field_name =
key === 'item_id' ? '道具名称/ID' : methodData.fields[key]
fields_name[idx]
? fields_name.splice(idx, 0, field_name)
: (fields_name[idx] = field_name)