shish 8 месяцев назад
Родитель
Сommit
be39a56644

+ 2 - 0
app-ghs/controllers/PicTextController.php

@@ -73,6 +73,7 @@ class PicTextController extends BaseController
     {
         $post = Yii::$app->request->post();
         $switch = $post['switch'] ?? 0;
+        $purchaseGuideText = $post['purchaseGuideText'] ?? '';
         $shopId = $this->shopId;
         $picTextId = intval($post['picTextId']);
         $ext = ShopExtClass::getByCondition(['shopId' => $shopId], true);
@@ -87,6 +88,7 @@ class PicTextController extends BaseController
         } else {
             $ext->purchaseGuide = 0;
         }
+        $ext->purchaseGuideText = $purchaseGuideText;
         $ext->save();
         util::complete('修改成功');
     }

+ 1 - 1
app-ghs/controllers/ShopController.php

@@ -650,7 +650,7 @@ class ShopController extends BaseController
         if ($shopId <= 0) {
             util::fail('门店数据错误');
         }
-        $shopExt = ShopExtClass::getByCondition(['shopId' => $shopId], false, false, 'id, shopId, purchaseGuide');
+        $shopExt = ShopExtClass::getByCondition(['shopId' => $shopId], false, false, 'id, shopId, purchaseGuide,purchaseGuideText');
         if ($shopExt['purchaseGuide'] > 0) {
             $picText = PicTextClass::getById($shopExt['purchaseGuide'], false, 'id, title');
             $shopExt['title'] = $picText['title'] ?? '';

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

@@ -302,8 +302,9 @@ class GhsController extends BaseController
 
         // 弃用 buyNotice, 使用 xhShopExt 表里的 purchaseGuide
         // $info['buyNotice'] = $ghsShop->buyNotice ?? 0;
-        $shopExt = ShopExtClass::getByCondition(['shopId' => $ghsShopId], false, false, 'purchaseGuide,hcFreeKm,hcMap');
+        $shopExt = ShopExtClass::getByCondition(['shopId' => $ghsShopId], false, false, 'purchaseGuide,purchaseGuideText,hcFreeKm,hcMap');
         $ghsInfo['buyNotice'] = $shopExt['purchaseGuide'] > 0 ? 1 : 0; //兼容原有设定:购买须知 0.没有 1.有
+        $ghsInfo['buyNoticeText'] = $shopExt['purchaseGuideText'] ?? '';
 
         //判断是否开启同城配送功能
         $intraCityRet = ShopClass::hasIntraCity($ghsShop);