shish 4 år sedan
förälder
incheckning
f79ae3ac90
1 ändrade filer med 6 tillägg och 3 borttagningar
  1. 6 3
      app-mall/controllers/ShopController.php

+ 6 - 3
app-mall/controllers/ShopController.php

@@ -22,9 +22,12 @@ class ShopController extends BaseController
     public function actionInfo()
     {
         $shop = $this->shop;
-        $info = $shop->attributes;
-        $superWx = $info['superWx'] ?? '';
-        $info['superWx'] = imgUtil::groupImg($superWx) . "?x-oss-process=image/resize,m_fill,h_700,w_700";
+        $info = !empty($shop) ? $shop->attributes : [];
+        $info['superWx'] = '';
+        if (isset($info['superWx'])) {
+            $superWx = $info['superWx'];
+            $info['superWx'] = imgUtil::groupImg($superWx) . "?x-oss-process=image/resize,m_fill,h_700,w_700";
+        }
         util::success(['info' => $info]);
     }