diff --git a/src/forge/users/Statistics/Index.jsx b/src/forge/users/Statistics/Index.jsx index 457ddff07..8c946d4aa 100644 --- a/src/forge/users/Statistics/Index.jsx +++ b/src/forge/users/Statistics/Index.jsx @@ -41,10 +41,12 @@ function Index(props) { function getRoleSta() { const url = `/users/${username}/statistics/role.json`; + let b = (dates && dates.length > 0 && dates[0]) ? Date.parse(dates[0])/1000 : undefined; + let e = (dates && dates.length > 0 && dates[1]) ? Date.parse(dates[1])/1000 : undefined; Axios.get(url,{ params:{ - start_time:dates && dates[0], - end_time:dates && dates[1] + start_time:b, + end_time:e } }).then(result=>{ if(result && result.data){ @@ -61,10 +63,12 @@ function Index(props) { function getRadarSta() { const url = `/users/${username}/statistics/develop.json`; + let b = (rDates && rDates.length > 0 && rDates[0]) ? Date.parse(rDates[0])/1000 : undefined; + let e = (rDates && rDates.length > 0 && rDates[1]) ? Date.parse(rDates[1])/1000 : undefined; Axios.get(url,{ params:{ - start_time:rDates && rDates[0], - end_time:rDates && rDates[1] + start_time:b, + end_time:e } }).then(result=>{ if(result && result.data){ @@ -107,10 +111,12 @@ function Index(props) { function getCloudSta() { const url = `/users/${username}/statistics/major.json`; + let b = (cData && cData.length > 0 && cData[0]) ? Date.parse(cData[0])/1000 : undefined; + let e = (cData && cData.length > 0 && cData[1]) ? Date.parse(cData[1])/1000 : undefined; Axios.get(url,{ params:{ - start_time:cData && cData[0], - end_time:cData && cData[1] + start_time:b, + end_time:e } }).then(result=>{ if(result && result.data){ @@ -137,8 +143,8 @@ function Index(props) { topThree && topThree.length > 0 &&