|
|
|
@ -9,6 +9,7 @@
|
|
|
|
|
|
|
|
|
|
namespace Admin\Controller;
|
|
|
|
|
use User\Api\UserApi as UserApi;
|
|
|
|
|
use Base\Repository\UserRepository;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 后台首页控制器
|
|
|
|
@ -43,6 +44,7 @@ class IndexController extends AdminController {
|
|
|
|
|
}
|
|
|
|
|
$this->assign('data',$data);
|
|
|
|
|
$this->indextt();
|
|
|
|
|
|
|
|
|
|
$this->meta_title = '管理首页';
|
|
|
|
|
|
|
|
|
|
// 日历
|
|
|
|
@ -51,15 +53,20 @@ class IndexController extends AdminController {
|
|
|
|
|
// 折线图
|
|
|
|
|
$this->foldLineDiagram($_REQUEST['start'],$_REQUEST['end'],$_REQUEST['num']);
|
|
|
|
|
|
|
|
|
|
$userRepository = new UserRepository();
|
|
|
|
|
$activeCount = $userRepository->getActiveUserCountRecently(7);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 累计数据
|
|
|
|
|
$user = D('User');
|
|
|
|
|
$spend = D('Spend');
|
|
|
|
|
$promote = D('Promote');
|
|
|
|
|
$this->assign('user_count',$user->old());
|
|
|
|
|
$this->assign('active_count',$user->active(['tab_user_login_record.login_time'=>['between',[mktime(0,0,0,date('m'),date('d')-7,date('Y')),mktime(0,0,0,date('m'),date('d'),date('Y'))-1]]]));
|
|
|
|
|
$this->assign('player_count',$spend->player());
|
|
|
|
|
$this->assign('money_sum',$spend->totalAmount());
|
|
|
|
|
$this->assign('promote_sum',$promote->total());
|
|
|
|
|
$this->assign('user_count', $user->old());
|
|
|
|
|
// $this->assign('active_count', $user->active(['tab_user_login_record.login_time'=>['between',[mktime(0,0,0,date('m'),date('d')-7,date('Y')),mktime(0,0,0,date('m'),date('d'),date('Y'))-1]]]));
|
|
|
|
|
$this->assign('active_count', $activeCount);
|
|
|
|
|
$this->assign('player_count', $spend->player());
|
|
|
|
|
$this->assign('money_sum', $spend->totalAmount());
|
|
|
|
|
$this->assign('promote_sum', $promote->total());
|
|
|
|
|
|
|
|
|
|
$this->display();
|
|
|
|
|
}
|
|
|
|
|