Show.php 979 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace app\admin\controller\customcharts;
  3. use app\common\controller\Backend;
  4. use think\Config;
  5. use think\Db;
  6. use addons\customcharts\library\Core as Customcharts;
  7. /**
  8. * 显示统计结果
  9. *
  10. * @icon fa fa-circle-o
  11. */
  12. class Show extends Backend
  13. {
  14. public function index()
  15. {
  16. if ($this->request->isPost()) {
  17. $date = $this->request->post('date', '');
  18. $totalChart = Customcharts::totalChart($date);
  19. $this->success('', '', $totalChart);
  20. }
  21. $totalNumber = Customcharts::totalNumber();
  22. $this->view->assign("totalNumber", $totalNumber);
  23. $totalChart = Customcharts::totalChart();
  24. $this->view->assign("totalChart", $totalChart);
  25. $this->assignconfig('totalChart', $totalChart);
  26. $totalRanking = Customcharts::totalRanking();
  27. $this->view->assign("totalRanking", $totalRanking);
  28. return $this->view->fetch();
  29. }
  30. }