DashboardController.php 898 B

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