public function actionIndex()
 {
     $view = \Yii::$app->view;
     $view->params['moduleName'] = '主表盘';
     // 入驻商家统计
     $store = Store::getStoreStatusNum();
     $waiting = 0;
     $approval = 0;
     $deny = 0;
     $disable = 0;
     foreach ($store as $v) {
         ${$v}['status'] = $v['num'];
     }
     // 充值统计
     $recharge = Recharge::getRechargeStatusAmount();
     $recharge_success_amount = 0;
     $recharge_success_num = 0;
     $recharge_wait_amount = 0;
     $recharge_wait_num = 0;
     foreach ($recharge as $v) {
         if ($v['status'] == 'success') {
             $recharge_success_amount = $v['amount'];
             $recharge_success_num = $v['num'];
         } elseif ($v['status'] == 'wait') {
             $recharge_wait_amount = $v['amount'];
             $recharge_wait_num = $v['num'];
         }
     }
     // 财务统计
     return $this->render('index', ['waiting' => $waiting, 'approval' => $approval, 'deny' => $deny, 'disable' => $disable, 'recharge_success_amount' => $recharge_success_amount, 'recharge_success_num' => $recharge_success_num, 'recharge_wait_amount' => $recharge_wait_amount, 'recharge_wait_num' => $recharge_wait_num]);
 }
示例#2
0
 /**
  * 充值统计
  */
 public function actionRecharge()
 {
     $view = \Yii::$app->view;
     $view->params['moduleName'] = '充值统计';
     $this->data['data'] = Recharge::getRechargeList($this->searchKey);
     return $this->render('recharge', $this->data);
 }