shish преди 5 години
родител
ревизия
29551f891f
променени са 1 файла, в които са добавени 40 реда и са изтрити 49 реда
  1. 40 49
      app/ghs/controllers/ConsoleController.php

+ 40 - 49
app/ghs/controllers/ConsoleController.php

@@ -13,53 +13,44 @@ use common\components\util;
 
 class ConsoleController extends BaseController
 {
-	
-	//概况 shish 2019.12.19
-	public function actionProfile()
-	{
-		$asset = MerchantAssetService::getByMerchantId($this->merchantId);
-		$notice = [
-			//['title' => '您还有10天试用期结束 ', 'action' => '立即续费', 'clickHint' => '请在手机上进行续费', 'url' => 'http://www.test.com'],
-		];
-		//今天访客数
-		$todayVisit = StatVisitService::getTodayVisitNum($this->merchantId);
-		//今天客户与粉丝数
-		$userData = StatUserService::getTodayNum($this->merchantId);
-		$todayFansNum = isset($userData['riseFansNum']) ? $userData['riseFansNum'] : 0;
-		$todayUserNum = isset($userData['riseUserNum']) ? $userData['riseUserNum'] : 0;
-		//今天订单数
-		$orderData = StatOrderService::getTodayNum($this->merchantId);
-		$todayOrder = isset($orderData['riseNum']) ? $orderData['riseNum'] : 0;
-		//今天收入
-		$incomeData = StatIncomeService::getTodayNum($this->merchantId);
-		$todayIncome = isset($incomeData['amount']) ? $incomeData['amount'] : 0;
-		$todayData = ['visit' => $todayVisit, 'fans' => $todayFansNum, 'user' => $todayUserNum, 'income' => $todayIncome, 'order' => $todayOrder];
-		
-		//当月的收入
-		$currentMonthIncome = StatIncomeMonthService::getCurrentMonthIncome($this->merchantId);
-		//上个月收入
-		$previousMonthIncome = StatIncomeMonthService::getPreviousMonthIncome($this->merchantId);
-		//最近7天收入变化趋势
-		$latestIncome = StatIncomeService::getLatestSevenDay($this->merchantId);
-		$incomeStat = [
-			'month' => $currentMonthIncome,
-			'week' => 999,
-			'previousMonth' => $previousMonthIncome,
-			'list' => $latestIncome,
-		];
-		$visitStat = [
-			'month' => 1999,
-			'week' => 999,
-			'list' => ['7.1' => 100, '7.2' => 200, '7.3' => 300, '7.4' => 400, '7.5' => 500],
-		];
-		util::success([
-			'asset' => $asset,
-			'notice' => $notice,
-			'todayData' => $todayData,
-			'admin' => ['avatar' => 'http://a.huahb.com/images/avatar.jpg'],
-			'visitStat' => $visitStat,
-			'incomeStat' => $incomeStat,
-		]);
-	}
-	
+
+    //概况 shish 2019.12.19
+    public function actionProfile()
+    {
+        $asset = MerchantAssetService::getByMerchantId($this->ghsId);
+        $notice = [
+            //['title' => '您还有10天试用期结束 ', 'action' => '立即续费', 'clickHint' => '请在手机上进行续费', 'url' => 'http://www.test.com'],
+        ];
+        //今天访客数
+        $todayVisit = StatVisitService::getTodayVisitNum($this->ghsId);
+        //今天客户与粉丝数
+        $userData = StatUserService::getTodayNum($this->ghsId);
+        $todayFansNum = isset($userData['riseFansNum']) ? $userData['riseFansNum'] : 0;
+        $todayUserNum = isset($userData['riseUserNum']) ? $userData['riseUserNum'] : 0;
+        //今天订单数
+        $orderData = StatOrderService::getTodayNum($this->ghsId);
+        $todayOrder = isset($orderData['riseNum']) ? $orderData['riseNum'] : 0;
+        //今天收入
+        $incomeData = StatIncomeService::getTodayNum($this->ghsId);
+        $todayIncome = isset($incomeData['amount']) ? $incomeData['amount'] : 0;
+        $todayData = ['visit' => $todayVisit, 'fans' => $todayFansNum, 'user' => $todayUserNum, 'income' => $todayIncome, 'order' => $todayOrder, 'expend' => 399];
+
+        $mainMenu = [
+            ['name' => '开单', 'img' => 'https://img.huaml.com/retail/admin/tab-icon-6.png', 'page' => '/pageA/merchant/getList'],
+            ['name' => '采购', 'img' => 'https://img.huaml.com/retail/admin/tab-icon-6.png', 'page' => '/pageA/merchant/getList'],
+        ];
+        $menu = [
+            ['name' => '库存预警', 'img' => 'https://img.huaml.com/retail/admin/tab-icon-6.png', 'page' => '/pageA/merchant/getList'],
+            ['name' => '改价', 'img' => 'https://img.huaml.com/retail/admin/tab-icon-6.png', 'page' => '/pageA/merchant/getList'],
+            ['name' => '全部', 'img' => 'https://img.huaml.com/retail/admin/tab-icon-6.png', 'page' => '/pageA/merchant/getList'],
+        ];
+        util::success([
+            'asset' => $asset,
+            'notice' => $notice,
+            'todayData' => $todayData,
+            'mainMenu' => $mainMenu,
+            'menu' => $menu,
+        ]);
+    }
+
 }