12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace app\admin\controller;
- use app\admin\model\Admin;
- use app\admin\model\User;
- use app\common\controller\Backend;
- use app\common\model\Attachment;
- use fast\Date;
- use think\Db;
- /**
- * 控制台
- *
- * @icon fa fa-dashboard
- * @remark 用于展示当前系统中的统计数据、统计报表及重要实时数据
- */
- class Dashboard extends Backend
- {
- /**
- * 查看
- */
- public function index()
- {
- //套餐延期申请
- $package_delay = Db::name('package_delay')->where('status',0)->count();
- //套餐转让申请
- $package_move = Db::name('package_move')->where('status',0)->count();
- //预约退课申请
- $order_refund = Db::name('order_refund')->where('status',0)->count();
- //公司团建预约
- $company_apply = Db::name('company_apply')->where('status',0)->count();
- //用户申请激活配套待审核
- $where = [
- 'order_status' => 1, //已支付
- 'is_gift' => 0, //不是赠品
- 'use_status' => 0, //未激活
- 'use_apply_status' => 1, //已申请激活
- ];
- $packageorder_audit = Db::name('package_order')->where($where)->count();
- $this->view->assign([
- 'package_delay' => $package_delay,
- 'package_move' => $package_move,
- 'order_refund' => $order_refund,
- 'company_apply' => $company_apply,
- 'packageorder_audit' => $packageorder_audit,
- ]);
- return $this->view->fetch();
- }
- }
|