shish 1 年之前
父節點
當前提交
d828a1b87b
共有 1 個文件被更改,包括 9 次插入7 次删除
  1. 9 7
      app-ghs/controllers/ConsoleController.php

+ 9 - 7
app-ghs/controllers/ConsoleController.php

@@ -140,7 +140,7 @@ class ConsoleController extends BaseController
                 $sale = bcadd($sale, $item['amount'], 2);
             }
         }
-        util::success(['income'=>$sale]);
+        util::success(['income' => $sale]);
     }
 
     //今日概况 ssh 20220723
@@ -151,15 +151,17 @@ class ConsoleController extends BaseController
 
         $notice = [];
         $shop = $this->shop;
-        $deadline = $shop->deadline;
-        $currentTime = time();
-        $deadTime = strtotime($deadline);
-        if($currentTime>$deadTime){
-            $notice[] = ['title' => '系统已到期,即将停用,请及时续费', 'action' => '查看', 'page' => '/admin/notice/fee'];
+        if (!empty($shop)) {
+            $deadline = $shop->deadline;
+            $currentTime = time();
+            $deadTime = strtotime($deadline);
+            if ($currentTime > $deadTime) {
+                $notice[] = ['title' => '系统已到期,即将停用,请及时续费', 'action' => '查看', 'page' => '/admin/notice/fee'];
+            }
         }
 
         $mainId = $this->mainId;
-        if(!in_array($mainId,[23390,23884,45354,40624,10975])){
+        if (!in_array($mainId, [23390, 23884, 45354, 40624, 10975])) {
             //$notice[] = ['title' => '明天起续年费需涨600元,请提前安排', 'action' => '如何续', 'page' => '/admin/notice/fee'];
         }