|
|
@@ -9,6 +9,7 @@ use bizHd\stat\services\StatOrderService;
|
|
|
use bizHd\stat\services\StatUserService;
|
|
|
use bizHd\stat\services\StatVisitService;
|
|
|
use common\components\dict;
|
|
|
+use common\components\httpUtil;
|
|
|
use common\components\util;
|
|
|
|
|
|
class ConsoleController extends BaseController
|
|
|
@@ -50,18 +51,22 @@ class ConsoleController extends BaseController
|
|
|
$todayIncome = isset($incomeData['amount']) ? $incomeData['amount'] : 0;
|
|
|
$todayData = ['visit' => $todayVisit, 'fans' => $todayFansNum, 'user' => $todayUserNum, 'income' => $todayIncome, 'order' => $todayOrder];
|
|
|
|
|
|
- //当月的收入
|
|
|
- $currentMonthIncome = StatIncomeMonthService::getCurrentMonthIncome($this->sjId);
|
|
|
- //上个月收入
|
|
|
- $previousMonthIncome = StatIncomeMonthService::getPreviousMonthIncome($this->sjId);
|
|
|
- //最近7天收入变化趋势
|
|
|
- $latestIncome = StatIncomeService::getLatestSevenDay($this->sjId);
|
|
|
- $incomeStat = [
|
|
|
- 'month' => $currentMonthIncome,
|
|
|
- 'week' => 999,
|
|
|
- 'previousMonth' => $previousMonthIncome,
|
|
|
- 'list' => $latestIncome,
|
|
|
- ];
|
|
|
+ $incomeStat = [];
|
|
|
+ if(httpUtil::isMiniProgram() == false){
|
|
|
+ //当月的收入
|
|
|
+ $currentMonthIncome = StatIncomeMonthService::getCurrentMonthIncome($this->shopId);
|
|
|
+ //上个月收入
|
|
|
+ $previousMonthIncome = StatIncomeMonthService::getPreviousMonthIncome($this->shopId);
|
|
|
+ //最近7天收入变化趋势
|
|
|
+ $latestIncome = StatIncomeService::getLatestSevenDay($this->shopId);
|
|
|
+ $incomeStat = [
|
|
|
+ 'month' => $currentMonthIncome,
|
|
|
+ 'week' => 999,
|
|
|
+ 'previousMonth' => $previousMonthIncome,
|
|
|
+ 'list' => $latestIncome,
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
$visitStat = [
|
|
|
'month' => 1999,
|
|
|
'week' => 999,
|