作者 董瑞恩
1 个管道 的构建 通过 耗费 0 秒

order

@@ -47,15 +47,15 @@ class AdminStatisticsController extends AdminBaseController{ @@ -47,15 +47,15 @@ class AdminStatisticsController extends AdminBaseController{
47 47
48 //周统计 48 //周统计
49 $week=array(); 49 $week=array();
50 - for ($i = 0; $i <= 15; $i++){  
51 - $week[15-$i]=strtotime(date('Ymd',strtotime("-$i week"))); 50 + for ($i = 0; $i <= 30; $i++){
  51 + $week[30-$i]=strtotime(date('Ymd',strtotime("-$i week")));
52 } 52 }
53 $Week=array(); 53 $Week=array();
54 - for ($i = 0; $i<15; $i++){ 54 + for ($i = 0; $i<30; $i++){
55 $Week[$i]=[$week[$i],$week[$i+1]]; 55 $Week[$i]=[$week[$i],$week[$i+1]];
56 } 56 }
57 $Week_statistics=array(); 57 $Week_statistics=array();
58 - for ($i = 0; $i<15; $i++){ 58 + for ($i = 0; $i<30; $i++){
59 $Week_statistics[]=Db::name('order')->where('start_time','between',$Week[$i])->count(); 59 $Week_statistics[]=Db::name('order')->where('start_time','between',$Week[$i])->count();
60 } 60 }
61 $this->assign('weekData',json_encode($Week_statistics)); 61 $this->assign('weekData',json_encode($Week_statistics));
@@ -432,7 +432,7 @@ @@ -432,7 +432,7 @@
432 realtime: true, 432 realtime: true,
433 y : 220, 433 y : 220,
434 height: 20, 434 height: 20,
435 - start : 0, 435 + start : 50,
436 end : 100 436 end : 100
437 }, 437 },
438 438