shish hace 1 año
padre
commit
a324414f80
Se han modificado 1 ficheros con 5 adiciones y 3 borrados
  1. 5 3
      app-ghs/controllers/MainController.php

+ 5 - 3
app-ghs/controllers/MainController.php

@@ -234,9 +234,11 @@ class MainController extends BaseController
         $cashAccount = $main->cashAccount ?? '';
         $sj = isset($this->sj) && !empty($this->sj) ? $this->sj->attributes : [];
 
-        $shopImg = !empty($shop->avatar) ? imgUtil::groupImg($shop->avatar) : imgUtil::groupImg('');
-
-        $smallShopImg = imgUtil::groupImg($shop->avatar) . "?x-oss-process=image/resize,m_fill,h_80,w_80";
+        $shopImg = imgUtil::groupImg('');
+        if (!empty($shop)) {
+            $shopImg = imgUtil::groupImg($shop->avatar);
+        }
+        $smallShopImg = $shopImg . "?x-oss-process=image/resize,m_fill,h_80,w_80";
 
         $deadline = $sj['deadline'] ?? '';
         $relation = isset($this->shopAdmin) && !empty($this->shopAdmin) ? $this->shopAdmin->attributes : [];