forked from Gitlink/forgeplus-react
数据统计三个时间筛选参数值必须是时间戳
This commit is contained in:
parent
e185ae6484
commit
40f8f5d872
|
@ -41,10 +41,12 @@ function Index(props) {
|
||||||
|
|
||||||
function getRoleSta() {
|
function getRoleSta() {
|
||||||
const url = `/users/${username}/statistics/role.json`;
|
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,{
|
Axios.get(url,{
|
||||||
params:{
|
params:{
|
||||||
start_time:dates && dates[0],
|
start_time:b,
|
||||||
end_time:dates && dates[1]
|
end_time:e
|
||||||
}
|
}
|
||||||
}).then(result=>{
|
}).then(result=>{
|
||||||
if(result && result.data){
|
if(result && result.data){
|
||||||
|
@ -61,10 +63,12 @@ function Index(props) {
|
||||||
|
|
||||||
function getRadarSta() {
|
function getRadarSta() {
|
||||||
const url = `/users/${username}/statistics/develop.json`;
|
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,{
|
Axios.get(url,{
|
||||||
params:{
|
params:{
|
||||||
start_time:rDates && rDates[0],
|
start_time:b,
|
||||||
end_time:rDates && rDates[1]
|
end_time:e
|
||||||
}
|
}
|
||||||
}).then(result=>{
|
}).then(result=>{
|
||||||
if(result && result.data){
|
if(result && result.data){
|
||||||
|
@ -107,10 +111,12 @@ function Index(props) {
|
||||||
|
|
||||||
function getCloudSta() {
|
function getCloudSta() {
|
||||||
const url = `/users/${username}/statistics/major.json`;
|
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,{
|
Axios.get(url,{
|
||||||
params:{
|
params:{
|
||||||
start_time:cData && cData[0],
|
start_time:b,
|
||||||
end_time:cData && cData[1]
|
end_time:e
|
||||||
}
|
}
|
||||||
}).then(result=>{
|
}).then(result=>{
|
||||||
if(result && result.data){
|
if(result && result.data){
|
||||||
|
@ -137,8 +143,8 @@ function Index(props) {
|
||||||
topThree && topThree.length > 0 &&
|
topThree && topThree.length > 0 &&
|
||||||
<div className="roundBox">
|
<div className="roundBox">
|
||||||
<Round num={topThree[0][1]} color="#FF7F69" name={topThree[0][0]}/>
|
<Round num={topThree[0][1]} color="#FF7F69" name={topThree[0][0]}/>
|
||||||
<Round num={topThree[1][1]} color="#99dfff" name={topThree[1][0]}/>
|
{ topThree[1] && <Round num={topThree[1][1]} color="#99dfff" name={topThree[1][0]}/> }
|
||||||
<Round num={topThree[2][1]} color="#ff9e48" name={topThree[2][0]}/>
|
{ topThree[2] && <Round num={topThree[2][1]} color="#ff9e48" name={topThree[2][0]}/> }
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue