DashboardController.php 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace app\admin\controller\dashboard;
  3. use app\admin\service\statistics\AppointmentService;
  4. use app\admin\service\statistics\ChatMessageService;
  5. use app\admin\service\statistics\CustomerService;
  6. use app\admin\service\statistics\DeviceService;
  7. use app\admin\service\statistics\GoodsService;
  8. use app\admin\service\statistics\MemberService;
  9. use app\admin\service\statistics\OrderService;
  10. class DashboardController
  11. {
  12. public function index()
  13. {
  14. $data['customer'] = CustomerService::getCustomer();
  15. // 用户 会员+业主
  16. $data['member'] = MemberService::getMember();
  17. // 设备
  18. $data['device'] = DeviceService::getDevice();
  19. // 预约
  20. $data['appointment'] = AppointmentService::getAppointment();
  21. // 订单
  22. $data['order'] = OrderService::getOrder();
  23. // 商品
  24. $data['goods'] = GoodsService::getGoods();
  25. // 咨询
  26. $data['chat'] = ChatMessageService::getChatMessage();
  27. return json_success('', $data);
  28. }
  29. }