shish 4 년 전
부모
커밋
f79ae3ac90
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  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()
     public function actionInfo()
     {
     {
         $shop = $this->shop;
         $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]);
         util::success(['info' => $info]);
     }
     }