shish 5 年之前
父节点
当前提交
d02751d4db
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app-hd/controllers/MainController.php

+ 2 - 2
app-hd/controllers/MainController.php

@@ -82,10 +82,10 @@ class MainController extends BaseController
         $shop = $this->shop;
         $balance = $shop->balance ?? 0.00;
         $txBalance = $shop->txBalance ?? 0.00;
-        $sj = $this->sj->attributes;
+        $sj = isset($this->sj) && !empty($this->sj) ? $this->sj->attributes : [];
         $shopImg = $shop->avatar ?? '';
         $deadline = $sj['deadline'] ?? '';
-        $relation = $this->shopAdmin->attributes;
+        $relation = isset($this->shopAdmin) && !empty($this->shopAdmin) ? $this->shopAdmin->attributes : [];
         $adminName = $relation['name'];
         $shopAdminId = $relation['id'];
         $mobile = $relation['mobile'] ?? '';