Home.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2. include_once(FCPATH . 'application/controllers/Base_Controller.php');
  3. class Home extends Base_Controller {
  4. public function __construct() {
  5. parent::__construct();
  6. }
  7. // 设备统计信息
  8. public function data(){
  9. $data = array(
  10. 'day_new_count' => 0,
  11. 'day_faulty_count' => 0,
  12. 'total_light_count' => 0,
  13. 'light_up_count' => 0,
  14. 'online_count' => 0,
  15. 'faulty_count' => 0,
  16. );
  17. exit(json_result('0000',$this->response['0000'],$data));
  18. }
  19. // 发用电量统计信息
  20. public function sta_info(){
  21. $data = array(
  22. 'electricity' => 0,
  23. 'CO2_reduction' => 0,
  24. 'SO2_reduction' => 0,
  25. 'TCE_reduction' => 0
  26. );
  27. exit(json_result('0000',$this->response['0000'],$data));
  28. }
  29. // 设备统计列表
  30. public function dev_list(){
  31. exit(json_result('0000',$this->response['0000'],array('list'=>array())));
  32. }
  33. // 故障信息列表
  34. public function alarm_list(){
  35. exit(json_result('0000',$this->response['0000'],array()));
  36. }
  37. }