diff --git a/api/app/lib/controllers/member/index.js b/api/app/lib/controllers/member/index.js index 9aacd54..fc6a824 100644 --- a/api/app/lib/controllers/member/index.js +++ b/api/app/lib/controllers/member/index.js @@ -375,7 +375,7 @@ async function overTimeStatistics (ctx) { let returnD = { ...(statisticRes.length ? statisticRes[0] : {}), data: dataRes, - dayStatisticData: statisticDayRes + dayStatisticData: statisticDayRes.sort((a,b)=>moment(a.day)-moment(b.day)) } ctx.status = 200; ctx.body = returnD @@ -465,7 +465,7 @@ async function vacateStatistics (ctx) { let returnD = { statistic: statisticRes, data: dataRes, - dayStatisticData: statisticDayRes + dayStatisticData: statisticDayRes.sort((a,b)=>moment(a.day)-moment(b.day)) } ctx.status = 200; ctx.body = returnD