From bcdf506e6cead5da098ff39757ee9ffcbe3e9a9a Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 4 Jun 2021 14:29:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1=E4=B8=89?= =?UTF-8?q?=E4=B8=AA=E6=97=B6=E9=97=B4=E7=AD=9B=E9=80=89=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=80=BC=E5=BF=85=E9=A1=BB=E6=98=AF=E6=97=B6=E9=97=B4=E6=88=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/users/Statistics/Index.jsx | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) 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 &&
- - + { topThree[1] && } + { topThree[2] && }
} {