|
|
@@ -15,7 +15,7 @@ use Yii;
|
|
|
class ConsoleController extends BaseController
|
|
|
{
|
|
|
|
|
|
- public $guestAccess = ['init', 'profile'];
|
|
|
+ public $guestAccess = ['init', 'profile', 'Stroke-count', 'stat'];
|
|
|
|
|
|
//总览
|
|
|
public function actionStat()
|
|
|
@@ -59,6 +59,20 @@ class ConsoleController extends BaseController
|
|
|
//系统收入、客服收入、欠款
|
|
|
public function actionStrokeCount()
|
|
|
{
|
|
|
+
|
|
|
+ if (empty($this->mainId)) {
|
|
|
+ util::success([
|
|
|
+ 'systemIncome' => 0,
|
|
|
+ 'systemCount' => 0,
|
|
|
+ 'debtCount' => 0,
|
|
|
+ 'debtIncome' => 0,
|
|
|
+ 'kfWxCount' => 0,
|
|
|
+ 'kfWxIncome' => 0,
|
|
|
+ 'cashCount' => 0,
|
|
|
+ 'cashIncome' => 0,
|
|
|
+ ]);
|
|
|
+ }
|
|
|
+
|
|
|
$incomeList = StatKdClass::eachChannelIncome($this->mainId, $this->shop);
|
|
|
|
|
|
$systemIncome1 = $incomeList['system']['category']['ls']['amount'] ?? 0;
|