Commit cfe7cd58 by 赵增煜

统计bug

parent 3291bb79
...@@ -18,10 +18,10 @@ protected function init() ...@@ -18,10 +18,10 @@ protected function init()
$this->title('New Users'); $this->title('New Users');
$this->dropdown([ $this->dropdown([
'7' => 'Last 7 Days', // '7' => 'Last 7 Days',
'28' => 'Last 28 Days', // '28' => 'Last 28 Days',
'30' => 'Last Month', // '30' => 'Last Month',
'365' => 'Last Year', // '365' => 'Last Year',
]); ]);
} }
......
...@@ -62,7 +62,7 @@ public function handle(Request $request) ...@@ -62,7 +62,7 @@ public function handle(Request $request)
$labels = array_keys($datesRange); $labels = array_keys($datesRange);
$data = array_values($datesRange); $data = array_values($datesRange);
// 卡片内容 // 卡片内容
$this->withContent($data[6]); $this->withContent($data[7] ?? 0);
// 图表数据 // 图表数据
$this->withChart([ $this->withChart([
[ [
......
...@@ -71,7 +71,7 @@ public function handle(Request $request) ...@@ -71,7 +71,7 @@ public function handle(Request $request)
$labels = array_keys($datesRange); $labels = array_keys($datesRange);
$data = array_values($datesRange); $data = array_values($datesRange);
// 卡片内容 // 卡片内容
$this->withContent($data[6]); $this->withContent($data[7] ?? 0);
// 图表数据 // 图表数据
$this->withChart([ $this->withChart([
[ [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment