shish 8 kuukautta sitten
vanhempi
commit
b3b5660e3e
1 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  1. 6 2
      app-hd/controllers/GhsController.php

+ 6 - 2
app-hd/controllers/GhsController.php

@@ -326,10 +326,10 @@ class GhsController extends BaseController
     public function actionInfo()
     {
         $shopId = Yii::$app->request->get('shopId');
-        if (isset($this->shopId) && !empty($this->shopId)) {
+        if (!empty($this->shopId)) {
 
             $current = ShopClass::getById($shopId, true);
-            if (isset($current->ptStyle) == false || $current->ptStyle != dict::getDict('ptStyle', 'ghs')) {
+            if (!isset($current->ptStyle) || $current->ptStyle != dict::getDict('ptStyle', 'ghs')) {
                 util::fail('没有找到批发店');
             }
 
@@ -349,7 +349,11 @@ class GhsController extends BaseController
             $giveLevel = $ghs['giveLevel'] ?? 0;
             $ghs['giveLevelName'] = $map[$giveLevel] ?? '';
             $ghs['showSold'] = $ghsShop->showSold ?? 0;
+
             $ghs['buyNotice'] = $ghsShop->buyNotice ?? 0;
+            $shopExt = ShopExtClass::getByCondition(['shopId' => $ghsShopId], true, false, 'id,shopId,purchaseGuideText');
+            $ghs['buyNoticeText'] = $shopExt->purchaseGuideText ?? '';
+
             $ghs['xrFl'] = $ghsShop->xrFl ?? 0;
             $ghs['xrFlAmount'] = $ghsShop->xrFlAmount ?? 0;
             $ghs['tjFl'] = $ghsShop->tjFl ?? 0;