|
|
@@ -48,19 +48,25 @@ class ConsoleController extends BaseController
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //今天访客
|
|
|
- $todayVisit = StatVisitService::getTodayVisitNum($this->shopId);
|
|
|
- //今天开单
|
|
|
- $orderData = StatOrderService::getTodayNum($this->shopId);
|
|
|
- $todayOrder = isset($orderData['riseNum']) ? $orderData['riseNum'] : 0;
|
|
|
- //今天收入
|
|
|
- $incomeData = StatIncomeService::getTodayNum($this->shopId);
|
|
|
- $todayIncome = isset($incomeData['amount']) ? $incomeData['amount'] : 0;
|
|
|
- //今天新学员数
|
|
|
- $newStudent = StatStudentClass::getTodayNum($this->shop);
|
|
|
- //今日概况
|
|
|
+ if (isset($this->shop) && !empty($this->shop)) {
|
|
|
+ //今天访客
|
|
|
+ $todayVisit = StatVisitService::getTodayVisitNum($this->shopId);
|
|
|
+ //今天开单
|
|
|
+ $orderData = StatOrderService::getTodayNum($this->shopId);
|
|
|
+ $todayOrder = isset($orderData['riseNum']) ? $orderData['riseNum'] : 0;
|
|
|
+ //今天收入
|
|
|
+ $incomeData = StatIncomeService::getTodayNum($this->shopId);
|
|
|
+ $todayIncome = isset($incomeData['amount']) ? $incomeData['amount'] : 0;
|
|
|
+ //今天新学员数
|
|
|
+ $newStudent = StatStudentClass::getTodayNum($this->shop);
|
|
|
+ //今日概况
|
|
|
+ } else {
|
|
|
+ $todayVisit = 0;
|
|
|
+ $todayIncome = 0.00;
|
|
|
+ $todayOrder = 0;
|
|
|
+ $newStudent = 0;
|
|
|
+ }
|
|
|
$todayData = ['visit' => $todayVisit, 'income' => $todayIncome, 'order' => $todayOrder, 'newStudent' => $newStudent];
|
|
|
-
|
|
|
$incomeStat = [];
|
|
|
if (httpUtil::isMiniProgram() == false) {
|
|
|
//当月的收入
|