| 12345678910111213141516171819202122232425262728 |
- <?php
- namespace addons\Store\client\controllers;
- use addons\ReservationService\common\services\BackendService;
- use addons\Store\common\services\StaffService;
- class ReserveDataController extends BaseController
- {
- /**
- * 数据概况
- * @return mixed|null
- */
- public function actionIndex()
- {
- if (\Yii::$app->request->isAjax && \Yii::$app->request->isGet) {
- $service = new StaffService(['store_id' => $this->store_id, 'mall_id' => $this->mall_id]);
- $ret['statistics'] = $service->statistics();
- $ret['order_rank'] = $service->orderRank();
- $ret['rating_rank'] = $service->ratingRand();
- $ret['custom_text'] = BackendService::getCustomText($this->mall_id);
- return $this->success('获取成功', $ret);
- }
- return $this->render('index');
- }
- }
|