Browse Source

公告内容

shish 10 months ago
parent
commit
6a43f7eb74
1 changed files with 5 additions and 6 deletions
  1. 5 6
      app-ghs/controllers/ShopController.php

+ 5 - 6
app-ghs/controllers/ShopController.php

@@ -693,11 +693,10 @@ class ShopController extends BaseController
         $shopExt = ShopExtClass::getByCondition(['shopId' => $shopId], false, false, 'id, shopId, purchaseGuide');
         if ($shopExt['purchaseGuide'] > 0) {
             $picText = PicTextClass::getById($shopExt['purchaseGuide'], false, 'id, title');
+            $shopExt['title'] = $picText['title'] ?? '';
         }
-        if ($shopExt) {
-            $shopExt['title'] = isset($picText['title']) ? $picText['title'] : '';
-            util::success(['shopExt' => $shopExt]);
-        }
-        util::fail('获取数据失败');
+        $shop = $this->shop;
+        util::success(['shopExt' => $shopExt, 'shop' => $shop]);
     }
-}
+
+}